npm install -g bower error
npm install -g bower
npm WARN deprecated [email protected]: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in
Permission to modify the directory where NPM package is installed:
sudo chown - R $user/usr/local
and enter the password
LS - L/usr/local
check whether the directory has switched permissions. If LS can view the corresponding directory, it’s OK, as shown in figure
Next, you can install the NPM global package: NPM install – G bower
pays more attention to the official account.
Similar Posts:
- Mac: How to Solve global module install error
- An error is reported when NPM install is used in WSL
- Root permission NPM global installation (- G) will still have insufficient permissions. Please know the parameter unsafe perm
- NPM install socket.io[UNK][UNK] error: [UNK](npm WARN enoent ENOENT: no such file or directory, open ‘/usr/local/no…
- npm install: npm ERR! errno -4048, Error: EPERM: operation not permitted[How to Solve]
- Mac download wepy error reporting solution
- [Solved] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
- The global installation NPM package reported an error and did not have permission
- NPM err installation dependency package error [How to Solve]
- [Solved] NPM installation error: error: eacces: permission denied