Skip to content
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 installation fails on OS X High Sierra #110

Open
ghost opened this issue Dec 18, 2017 · 1 comment
Open

npm installation fails on OS X High Sierra #110

ghost opened this issue Dec 18, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 18, 2017

$ npm --version
5.5.1

$ sudo npm install -g dtrace-provider

[email protected] install /usr/local/lib/node_modules/dtrace-provider
node scripts/install.js

fs.js:784
return binding.rename(pathModule.toNamespacedPath(oldPath),
^

Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/dtrace-provider/compile.py' -> '/usr/local/lib/node_modules/dtrace-provider/binding.gyp'
at Object.fs.renameSync (fs.js:784:18)
at Object. (/usr/local/lib/node_modules/dtrace-provider/scripts/install.js:14:4)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:618:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2017-12-18T03_49_49_381Z-debug.log

@melloc
Copy link
Collaborator

melloc commented Jan 12, 2018

This looks like a problem with how npm drops permissions when doing a global install. I haven't been able to reproduce this, but I reworked how the install lifecycle script gets run to hopefully recover from this kind of failure better. If you've continued having the issue, could you please try again and see if it still fails? You may want to run it with V set in the environment. For example:

$ V=1 sudo npm install -g dtrace-provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant