Hacker News new | ask | show | jobs
by jfroma 4159 days ago
If you run npm with root, npm will run scripts with the user "nobody" by default. This means that npm doesn't run scripts as root even if you run "npm install" with root.

You can set another user instead of nobody with the "user" option and you can disable switching UID/GID using the "unsafe-perm" option but DO NOT DO THIS.

More information here: https://docs.npmjs.com/misc/config

edit: added more details.