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
[Bug] preinstall script during bootstrap shouldn't set npm_config_prefix #1866
Comments
This seems like the wrong place to run |
Also, note that v3.10.2 removed the extra root install lifecycle execution, as it caused more trouble than it was worth. Not sure what you'd expect from an |
...unless I'm completely wrong. Wouldn't be the first time this week, or even today. -_- |
cuz like, yeah, just running thanks for your patience, @ibezkrovnyi |
So, digging into it, |
which is equivalent of:
which is obviously wrong as we are already inside directory packages/projectA, no need for additional prefix which comes to us from Possible solutionIs it possible to just erase this env variable? ( Update
Thanks! Will test this later, 2 AM now :) |
No worries, thanks. Digging through the npm source, I'm fairly confident this value always defaults to the global prefix. Gonna push a patch that omits setting our custom value, and it should probably be fine for your use case. |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
We need to run
npm update
in some project aspreinstall
script duringlerna bootstrap
process.Expected Behavior
npm update
is run sucessfullyCurrent Behavior
npm update
is run withnpm_config_prefix
set to some location which is wrongDirectory where "preinstall" script with
npm update
was run bylerna bootstrap
is polluted with all files updated bynpm update
command.Workaround that doesn't work
npm --prefix ./ update
Workaround that works
npx crossenv npm_config_prefix=\"\"&&npm update
Possible Solution
To comment line
lerna/utils/run-lifecycle/run-lifecycle.js
Line 78 in a059afd
Steps to Reproduce (for bugs)
"preinstall": "npm update"
lerna bootstrap
Context
Your Environment
lerna --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: