Why is Parcel 2 not auto-installing imports as it was the case in Parcel 1?

82 Views Asked by At

I am trying to learn how to use Parcel and following the "learn web-dev" tutorial from Mozilla. The tutorial runs npm install parcel-bundler but when I did that I got the warning that it is now deprecated. Nonetheless I run the parcel server and my imports in js files (react and date-fns) are automatically added into package.json and installed.

Now I tried the same thing with the new Parcel 2, which I installed via "npm install parcel" and I also made the necessary changes according to the parceljs's documentation for the migration from parcel 1 to parcel 2 but it does not install my imports automatically. I got the errors such as @parcel/core: Failed to resolve 'date-fns/addDays' and @parcel/resolver-default: Cannot find module 'date-fns'.

I want them to be registered and installed automatically as it was the case with parcel 1. Am I missing a configuration or is it not supported anymore?

Thanks a lot for all the answers in advance!

0

There are 0 best solutions below