-
Notifications
You must be signed in to change notification settings - Fork 34.9k
[engineering] run npm i
during postinstall in parallel
#252068
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
base: main
Are you sure you want to change the base?
Conversation
The parallel parts work, but the node-gyp override is still problematic. According to the
So setting up |
Agreed, an option would be to check-in node-gyp into the source tree locked to a specific version similar to how it is bundled for npm. This would avoid any preinstall script dependency but comes with it own maintenance cost. How about moving the native module dependencies of the root folder into a subfolder say
The following additionally need to be covered,
But this seems like a good path forward, considering npm/cli#8153 coming our way which requires us to inject the npm config env variables rather than them being auto injected via the rc file we need a way for the root native modules to be adapted and this seems like a good solution to cover both. Thoughts ? |
opened #252171 for discussion on the dependency structure. |
Added a comment to the PR for the node-gyp config but perhaps it's better to continue here. The syntax in the
The |
@wraithgar thanks for the context, we did notice the config name was incorrect in #250554 (comment) :)
👍 |
this speeds up
npm i
considerably on all platformsi have been using this for a few months so all the bugs should be worked out
one major issue was running node-gyp in parallel can cause random corruption nodejs/node-gyp#3165
cc @deepak1556 #250554 #250981