parcel: After updating to parcel 2.2.1 the build system is flacky. It often fails. It take 2,3,4 runs to make it work.
๐ bug report
After updating to parcel 2.2.1 the build system is flaky. It often fails. It takes 2,3,4 runs to make it work. /c/Program Files/nodejs/npm: line 44: 2128 Segmentation fault โ$NODE_EXEโ โ$NPM_CLI_JSโ โ$@โ
๐ Configuration (.babelrc, package.json, cli command)
parcel watch src/web/pages/**/*.pug --dist-dir ./ --target public
{
"plugins": [
[
"transform-react-pug",
{
"classAttribute": "className"
}
],
"styled-jsx/babel",
"transform-jsx-css-modules",
"@babel/plugin-transform-runtime"
]
}
๐ค Expected Behavior
It should work the first time.
๐ฏ Current Behavior
After updating to parcel 2.2.1 the build system is flacky. It often fails. It take 2,3,4 runs to make it work. Sometimes it works aftet rimraffing .parcel_cache or npm rebuild, or both.
/c/Program Files/nodejs/npm: line 44: 2128 Segmentation fault โ$NODE_EXEโ โ$NPM_CLI_JSโ โ$@โ
๐ Possible Solution
Sometimes it works aftet rimraffing .parcel_cache or npm rebuild, or both.
๐ฆ Context
๐ป Code Sample
๐ Your Environment
Software | Version(s) |
---|---|
Parcel | 2.2.1 |
Node | v16.13.2 |
npm/Yarn | npm 8.1.2 |
Operating System | Windows 10 |
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 32 (6 by maintainers)
I think we narrowed this down to an upgrade of napi-rs in the
@parcel/source-map
package, which was released sometime after Parcel 2.2.1. I still donโt know the exact root cause, but for now Iโve reverted this upgrade and published@parcel/source-map
v2.0.2. See https://github.com/parcel-bundler/source-map/pull/91.Youโll need to remove
@parcel/source-map
2.0.1 from your lock file and re-install to get the upgrade. Please comment whether this works for you. Apologies again for the issue, and thanks for your patience while we track it down.I have 4 students hitting this bug tonight.
Yes, I also drop the parcel version from 2.2.1 to 2.0.0, these bug still happened on my Windows develop machine.
Yes, it works on my Windows 10 machine from git bash
Hello! I am also experiencing the same issue. Unfortunately my repository is also private however I will share as much as I can:
OR Even using the following:
my package.json might be smaller:
Another thing that may or may not be related: I have other students who are hitting what looks to be the same bug, but it doesnโt necessarily crash the same way (i.e., fails but no seg fault). The process seems to get stuck, and holds port 1234 open, blocking future invocations.
FWIW, the people Iโve seen hit it were all on Windows. I havenโt been able to reproduce this on macOS with
2.2.1
.@dailypixie I ended up doing the same. For reference in case someone needs it:
(Works on Cygwin, YMMV.)
But it still crashes a lot for me.
Has anyone managed to downgrade? Since Parcel packages specify dependences using
^
(e.g. https://github.com/parcel-bundler/parcel/blob/v2.2.0/packages/configs/default/package.json#L21), I get 2.2.1 versions even if I specify2.2.0
in mypackage.json
.