chrisa / node-dtrace-provider

Native DTrace probes for node.js apps
Other
319 stars 70 forks source link

When using npm to install/uninstall, see error about node scripts/install.js #107

Closed u84six closed 6 years ago

u84six commented 6 years ago

On macOS, I'm using npm 5.5.1 and node 9.1.0. Whenever I run install (and even uninstall), I see this error:

> dtrace-provider@0.8.5 install /Users/<username>/Development/node-projects/<project-name>/node_modules/dtrace-provider
> node scripts/install.js

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

Error: EACCES: permission denied, rename '/Users/<username>/Development/node-projects/<project-name>/node_modules/dtrace-provider/compile.py' -> '/Users/<username>/Development/node-projects/<project-name>/node_modules/dtrace-provider/binding.gyp'...

Any idea why this is happening for just this module?

Update: found the problem. My node_modules directory was created by root and was trying to install with user. Kind of strange, since I didn't use sudo on anything. So the solution was to delete the node_modules directory and then reinstall everything using npm.