Closed leggetter closed 7 years ago
I've tried to reproduce this with Node v6.7.0 and npm v3.10.8 and the install succeeds. I don't have any modules installed as global and no local modules installed.
Anybody else?
I tried in Node 6.7.0 and NPM 3.10.3 and it worked fine.
Also prepublish should not be called on install should it?
Even tried this on 6.7.0/3.10.7 and still works.
You wouldn't expect prepublish
to run upon install. But apparently it's does "by design" https://github.com/npm/npm/issues/3059
@leggetter we're not running NPM 1.2.0 though, and that issue is quite old.
Regardless: unless we can replicate this issue across multiple machines it's going to be hard to pinpoint the issue. I guess guidance for now for anyone having an issue is to look at their NPM version and upgrade?
The debug log of failure shows that the version of NPM isn't an old version:
2 info using npm@3.10.7
3 info using node@v6.7.0
I wonder if the install was performed locally?!
https://docs.npmjs.com/misc/scripts (see prepublish
)
In the log I can see:
silly cache add spec: '/Users/user_name/nexmo-cli'
@leggetter sure but the bug report is from an old version.
Can you try:
npm uninstall nexmo-cli
npm uninstall nexmo-cli -g
and then try reinstall again?
AFAICT this problem resulted from installing nexmo-cli
from a local version pulled from GitHub. That results in the prepublish
script being run which then introduces local dependencies that the person had to install. Running npm install
within the nexmo-cli
directory would have done that.
So I don't see this as a problem.
@leggetter yeah that makes sense. I wonder if we can detect this kind of install and do something about it to prevent it.
Steps to reproduce
Debug:
Expected behavior
Should install without error
Actual behavior
Errors as shown in log
See: https://github.com/npm/npm/issues/3059
System configuration
Node version: v6.7.0
NPM version: 3.10.7
Operating system: Darwin 15.6.0