-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
npm install
in a project with 2 nx
packages randomly fails with npm ERR! code 135
#26517
Comments
Having the same error randomly in our pipeline |
Having a similar issue here but it usually gets a |
A temporary fix for the meantime was to disable the |
As I mentioned in the issue, I was able to workaround it by opting into sequential postinstall script execution via: npm install --foreground-scripts |
Both great, though have to look into a PNPM version of it. 😄 |
Getting this error 20-30% of the time on my builds in both github action runners and heroku builders, EDIT: nvm got it! |
Well crap, IDK if I am doing something wrong but I used this package: https://www.npmjs.com/package/patch-package to allow me to patch a dependency using yarn 1.x.x and it seems like the patch happens after postinstalls are run (which kinda defeats the point)... @Daniel-Griffiths are you using yarn (also does anyone know the root cause of this issue? it is driving me mad and I've never seen it before. I've done a lot of |
@hevans90 That's the same issue I ran into, thats why I ended up using Yep! I was using yarn 2.x |
Also seeing rc 135 happen inconsistently -- occurs in all of these environments:
|
tentative de fix pour les erreurs sur la CI de github en relation avec `nx` (voir: nrwl/nx#26517)
FYI, |
One of the customers is using @FrozenPandaz would you have time to look into it? |
I debugged this for a while at Bun. I found that the bus error occurs inside This StackOverflow post has someone getting a similar error in Java, and the issue was that they had two processes, one of which had partially extracted a library file, while the other tried to open it and hit this exception because the file wasn't complete yet. I haven't looked at very much code from nx's install scripts, but I think something similar's probably going on here, and it explains why forcing the scripts to run sequentially or not at all fixes this error (it did for me, too). I have a core dump if anyone from nx wants that to debug. |
As running post-install scripts sequentially (or disabling them) has become a common workaround here, I'd like to emphasize that a much better solution is to eliminate multiple versions of the This naturally resolves the race condition between the nx daemon and multiple concurrent nx/bin/post-install.ts scripts, resulting in a healthier dependency graph for your workspace. |
I use python in my monorepo alongside node/react, which indeed caused different transitive I solved my particular situation by ensuring the transitive |
Thats me. we're running a single nx version, so i'm not sure that could be the issue honestly. we also use pnpm & install on our ci side with I've tried running --verbose, but it'll crash before any logging os done. However in our case we get this wen running
nx report NX Report complete - copy this into the issue template Node : 20.18.0 nx (global) : 20.0.0
|
I'm also seeing this when running multiple @Cammisuli based on the reports from @nbalu2 and @190n I went looking and found this: nx/packages/nx/src/native/index.js Lines 59 to 87 in beded4e
Since my processes are running in parallel, possibly one of the processes finishes copying the native library to the final location and tries to load it while the others are still writing to the same location, causing the SIGBUS signal on the process that finished first. To test this theory I added a previous step to my CI pipeline where I ensure NX runs once without concurrency so the library is properly copied ( |
Hello! I have similar problem at GHA and DO AppPlatform and I reread this issue mutliple times, but still I don't understand how I can manage |
We recently upgraded to Nx v20 and have begun to see this issue intermittently in our CI pipelines as well. Usually a rerun fixes it, it's not a consistent failure. npm error code 135
npm error path /opt/atlassian/pipelines/agent/build/client/node_modules/@angular-eslint/schematics/node_modules/nx
npm error command failed
npm error command sh -c node ./bin/post-install
npm error Bus error (core dumped)
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-12-20T17_51_30_509Z-debug-0.log |
This looks like a duplicate of nx-dotnet/nx-dotnet#911 and should be fixed there. Seems that As a workaround, you could try to add resolutions/overrides (depending on your package manager) to force a single |
We run into the same problem. We fixed it (for the moment) by using |
I ran into this today while trying to run
I know that, unfortunately, this is a huge security risk. It is however the only way to get my project to build at all on my machine at the moment, so I thought I'd drop it in here in case someone else tries to run their project without success. |
…ons of NX running postinstall at the same time See nrwl/nx#26517 (comment)
Current Behavior
npm install
on my CI job sometimes fails to complete because of a random postinstall failure.I think it might be related to multiple different versions of
nx
package brought bynx-dotnet
:Also, I found that it never fails when I use
Expected Behavior
If it is true that two different
nx
versions can conflict when installing, then it would be helpful to handle it if possibleGitHub Repo
No response
Steps to Reproduce
nx@19.2.3
and@nx-dotnet/core@2.2.0
npm install
In my case, I use an Ubuntu-based Jenkins job without
dotnet
(which might be important for nx-dotnet but shouldn't be a problem for overallnpm install
innx
workspace)Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
/cc @AgentEnder
The text was updated successfully, but these errors were encountered: