-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
“Unexpected early exit” when building with Node 20 and Yarn PnP #13106
Comments
Perhaps #13018 is related? |
I'm having a very similar issue of all of a sudden, looks like Vite is filling the SWAP file in WSL until it OOM and the Vite process returns
|
The reproduction works fine with same versions of node, yarn, npm in my macos. |
@sun0day For me it sometimes works on my Mac, oftentimes it does not. Same for my CI/CD pipeline. I suspect some kind of race condition, which is difficult to reproduce. Did you try it in GitHub Codespaces? I couldn’t get yarn berry to work in Stackblitz for some reason. |
Also, I feel that running |
Ah, I reproduced it. It's more like an issue of vite/packages/vite/src/node/plugins/html.ts Line 173 in c63ba3f
|
Ah, I wasn’t sure where to report this, as I could take away either Node 20 or Yarn PnP and the issue would disappear. Any idea on what exactly is wrong with |
Yarn PnP relies on Custom ESM loader and Custom ESM loader's internals has changed largely from Node v20. So if it's hangs at the dynamic import, I guess it's an issue on Node.js or yarn. |
@Braunson You might be running into nodejs/node#47566, have you tried with Node.js v20.1? |
@merceyz I resolved my issue. I'm using the latest Node 16.16.0 (LTS), the latest Yarn. My fix was to delete |
Just found #nodejs/47929 – is that maybe the same issue here? |
Appears to be fixed in Node 20.2. |
Describe the bug
Initiating a build in the MWE repository via
yarn build
results in the following error, after which the build fails:Reproduction
https://github.com/marvinruder/vite-project
Steps to reproduce
nvm install 20
and ensure thatnode -v
shows that the Node version is v20.x.xyarn
yarn build
and observe the error message shown aboveSystem Info
Used Package Manager
yarn
Logs
Click to expand
Validations
The text was updated successfully, but these errors were encountered: