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
parcel build
hangs on a random file
#7585
Comments
Does removing this line
in
Try removing these things:
|
Thank you for your help @mischnic!
Removing that line causes the build to fail with an error!
Would it still be helpful to try to reduce the Elm code? |
I suppose that this is the line the error is referring to: https://github.com/lezer-parser/common/blob/dffe4eda89fb46e6672eece613fdd0c9aeb7ad69/src/mix.ts#L183
|
Let me know what else I can do here—happy to open an issue in another repo or do more testing/scope narrowing if that would be helpful. I've already tested with different Elm minification options by modifying the code in |
also result into the
|
It looks like it does—the exact same error (I also deleted my |
Then please also try to simplify the non-Elm parts so that you can share your code |
It seems to have to do with Here's a repo demonstrating the issue: https://github.com/rjdellecese/parcel-2-repro. Let me know what else I can do! |
Actually, there might be more going on here, because just removing the I'll keep investigating. |
👍 Perfect Upstream swc issue for that terser/lezer problem: swc-project/swc#3366 |
I wasn’t having any luck isolating the issue any further, beyond that it had something to do with Terser minification. I also found mention of an issue with Terser on the Elm Discourse forum that matched exactly the description of the problem I was encountering, with no apparent resolution (https://discourse.elm-lang.org/t/ot-webpack-terser-build-issue/7606). So I resolved the problem by forking the Elm transformer in Parcel and replacing Terser as the minifier with SWC (https://swc.rs/docs/configuration/minification), and everything has worked fine since. At some point I might publish this on npm, but for now this plugin is just local to my project. Thank you again for the help! |
@rjdellecese I'm having the same issue, thank you for narrowing it down.
|
I'm experiencing the same Parcel 2.7.0 bug on building PNG files. |
🐛 bug report
parcel build
hangs, on a seemingly random file. My problem sounds identical to the one described in #6760. Passing the--no-optimize
flag causes the build to succeed. I've also, through testing different configurations in my.parcelrc
, discovered that removing the@parcel/transformer-js
transformer allows the build to succeed, too (although the resulting build is unusable).parcel serve
works fine.My project comprises Elm and TypeScript (no
.js
, and literally one.css
file with two lines, both of which are@import
s).🎛 Configuration
package.json
excerpt.parcelrc
🤔 Expected Behavior
parcel build
succeeds without incident.😯 Current Behavior
parcel build
hangs indefinitely on a random file.Screen.Recording.2022-01-20.at.5.49.43.PM.mov
parcel build --no-optimize
succeeds.parcel serve
works fine.🔦 Context
I just transitioned this project from Webpack 5. Everything has worked swimmingly, except for this!
💻 Code Sample
Unfortunately, the project in which I'm experiencing this issue is private, and I can't share the source code. I'm also not sure how to narrow the issue down any further than I have, but am more than willing to try if given suggestions on how!
🌍 Your Environment
The text was updated successfully, but these errors were encountered: