Error on CLI Build: No transformers found for [file] with pipeline: 'types'.
See original GitHub issueš bug report
Iām trying to upgrade to parcel 2.0.0 and made the appropriate changes for my setup (add type=āmoduleā, change āāout-dirā to āādist-dirā) but when trying to run my start command I get the following error in the console:
@parcel/core: No transformers found for example/raycast.html with pipeline: 'types'.
The error on itās own doesnāt make sense to me so itās unclear what I can do to fix it. I found this similar issue but the provided solution offers no explanation as to whatās going on and it isnāt viable for packages to remove the āmainā, āmoduleā and ātypesā fields from the package.json.
š Configuration (.babelrc, package.json, cli command)
cli command:
parcel watch ./example/raycast.html --dist-dir ./example/dev-bundle/ --public-url . --no-cache
š¤ Expected Behavior
That the parcel command work and build the html files into the provided directory the way it did before 2.0.0.
šÆ Current Behavior
An error is thrown, files are not built.
š Possible Solution
ā
š¦ Context
I cannot upgrade to v2.0.0 and take advantage of the new features including better WebWorker support, more correct script module tag interpretation.
š» Code Sample
ā
š Your Environment
Software | Version(s) |
---|---|
Parcel | v2.0.0 |
Node | v16.3.0 |
npm/Yarn | v6.14.9 |
Operating System | Windows 10 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Thanks for the suggestions @mischnic. Iāve gotten it working but I needed to work around a few things, first. I chose to create an empty package.json in my āexampleā folder and cdād into the example folder before building so I didnāt have to clutter my primary package.json these (imo) confusing ātargetsā field and mess with the side effects flag. I also moved my babel.config.json file used for my jest tests into the ./test folder so parcel would stop complaining about it.
If I can offer some feedback on the process here I think Parcel is trying a little too hard to be smart here. If Iām explicitly specifying entry points in my command line arguments is there a reason for it to be looking at my package.json for files? It doesnāt seem like it should be, at least. Likewise Iād like to be able to specify the babel config thatās used in the cli (or to ignore any that are found) so I have more control.
All I really want from a bundler is to be able to explicitly say ābundle these files with this configā. This approach of trying to auto build from the context of a users package.json is interesting but leaves a lot of guess work as to whatās being looked for when things donāt work out. It clearly has itās place but perhaps thereās room to add some arguments to say ājust pay attention to what I tell you aboutā?
Thank you again!
Hello, I had this same issue and I followed parcel documentation targets then I defined targets in my package.json file, something like this, below. It worked!
If someone fixed differently, please post it here. It would be really helpful.