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'
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.
Add parameter after executing command: –unsafe-perm
npm install --unsafe-perm @sentry/cli -g
- Docker Run ‘echo core ＞ /proc/sys/kernel/core_pattern‘ Error
- [Solved] Ubuntu Eclipse C/C++ Error: launch failed.binary not found
- Configure the node environment under Linux, internal/modules/cjs/loader.js:583 throw err; solution
- [Solved] RHEL 7 installs Oracle RAC 184.108.40.206, executes root.sh error ohasd: failed to start
- [Solved] Jenkins+Ant Error: Error reading project file xxxxx
- [Solved] Ubuntu: su Switch root Error: Authentication failure
- [Solved] docker Error: System has not been booted with systemd as init system (PID 1). Can‘t operate. Failed to con
- [Solved] nova-compute.log Error: Instance failed block device setup
- Linux Error: audit: backlog limit exceeded [How to Solve]
- Problem solving / etc/ rc.local The boot entry of the file configuration is invalid
- Linux: How to Solve sudo operate Error
- [Solved] /usr/bin/ld: cannot find crti.o: No such file or directory & /usr/bin/ld: cannot find -lc
- Termux setting path environment variable
- Ubuntu Server: How to Install Chrome
- The problem of inconsistent host names in building rabbitmq on Linux
- How to Solve NPM Error 426 Upgrade Required
- Hadoop 3.2.0 idea development environment construction and HDFS read write API operation
- Error: ENOSPC: no space left on device [How to Solve]
- [Solved] Keepalived Configurate Error: Unicast peers are not supported in strict mode
- [Solved] SSH WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!