Questions
When: NPM install @sentry/cli -g is executed as root, an error is reported:
npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/sentry-cli'
Cause
npm does not support running as root for security reasons. Even if you run it as root, npm will automatically redirect to a user named nobody, who has almost no privileges. In this case, if there are operations in the script that require permissions, such as writing files (especially to /root/.node-gyp), it will crash.
To avoid this, either follow the npm rules and create a privileged user specifically for running npm, or add the –unsafe-perm argument so that it doesn’t switch to nobody and runs as whatever user it is, even if it’s root.
Solution
Add parameter after executing command: –unsafe-perm
npm install --unsafe-perm @sentry/cli -g
Read More:
- Error: EACCES: permission denied, unlink ‘xxxx/xxxx/xxxx‘ [How to Solve]
- nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
- [Solved] WSL Ubuntu error: Access folder permission denied
- npm ERR! Failed at the [email protected] install script.
- Git Error: remote: HTTP Basic: Access denied [How to Solve]
- How to Solve NPM Error 426 Upgrade Required
- nvm npm Error: segmentation fault [How to Solve]
- [Solved] git error – remote: http basic: access denied
- How to Solve NPM Error: listen EADDRINUSE 127.0.0.1:8080
- Ubuntu Server: How to Install Chrome
- [Solved] Jenkins build error: esbuild install failed
- [Solved] Ubuntu 20.04 install MATLAB and toolbox permissions Error
- Error resolution in composer 2 install or update
- [Solved] MAC system brew install error: failure while executing
- Ubuntu18.04 Install ROS Error: rosdep update [How to Solve]
- How to Solve labelme Install Error in Ubuntu
- Linux Mint: linuxbrew Install and Boot Error [How to Solve]
- [Solved] Yum Install Software Error: Invalid configuration value: failovermethod=priority…
- Linux First Install oracle Start Error [How to Solve]
- ./configure Command Execute error (Centos7 Install erlang)