When NPM or cnpm is used to install the global module, an error message will be prompted:
LDX@admin88 ~ % npm install --global nodemon 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! 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.
Solution: modify user permissions
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
Just use NPM again to install the global module
Similar Posts:
- [Solved] WARN checkPermissions Missing write access to /usr/local/lib/node_modules
- An error is reported when NPM install is used in WSL
- Mac download wepy error reporting solution
- Root permission NPM global installation (- G) will still have insufficient permissions. Please know the parameter unsafe perm
- npm install: npm ERR! errno -4048, Error: EPERM: operation not permitted[How to Solve]
- [Solved] NPM installation error: error: eacces: permission denied
- The global installation NPM package reported an error and did not have permission
- NPM install socket.io[UNK][UNK] error: [UNK](npm WARN enoent ENOENT: no such file or directory, open ‘/usr/local/no…
- Completely Uninstall Node.js from Mac OS X
- After installing nodejs, running NPM – V will cause (module. JS: 339 throw err..) error. Solution