-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on CLI Build: No transformers found for [file] with pipeline: 'types'. #7218
Comments
If you only want to use Parcel to build the example and not the library itself, add this to package.json:
You'll also need to turn every this.worker = new Worker( new URL('./generateAsync.worker.js', import.meta.url), {type: "module"} ); But after that, the examples don't do anything because they are covered by the
So an |
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! |
Good afternoon! In the end, how to solve this problem? The main, module, types field is needed. And here they offer to delete them. |
I had this issue and fixed it by changing the |
Hello, I had this same issue and I followed parcel documentation targets
If someone fixed differently, please post it here. It would be really helpful. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
Not sure if this will help anyone, but I for some reason had this in my Package.json |
🐛 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:
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)
babel.config.json
package.json
cli command:
🤔 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
The text was updated successfully, but these errors were encountered: