node-dtrace-provider icon indicating copy to clipboard operation
node-dtrace-provider copied to clipboard

npm installation fails on OS X High Sierra

Open ghost opened this issue 8 years ago • 1 comments

$ 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

ghost avatar Dec 18 '17 03:12 ghost

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

melloc avatar Jan 12 '18 00:01 melloc