Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When i do npm install -g nodemon it shows me this
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/nodemon
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/nodemon'
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:
npm ERR! /Users/myname/.npm/_logs/2022-07-11T18_41_25_513Z-debug-0.log
Expected Behavior
Nodemon or any package should install as a global package
Steps To Reproduce
- In this environment iterm2/terminal
- With this config ; node bin location = /usr/local/bin/node
; node version = v16.16.0
; npm local prefix = /Users/myname/Desktop/e
; npm version = 8.13.2
; cwd = /Users/myname/Desktop/e
; HOME = /Users/myname
; Runnpm config ls -l
to show all defaults. - Run 'npm i -g nodemon'
- See error npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/nodemon
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/nodemon'
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:
npm ERR! /Users/myname/.npm/_logs/2022-07-11T18_45_30_613Z-debug-0.log
Environment
- npm: 8.13.2
- Node.js: v16.16.0
- OS Name: MacOs Monterey
- System Model Name: Macbook Pro
- npm config:
; node bin location = /usr/local/bin/node
; node version = v16.16.0
; npm local prefix = /Users/myname/Desktop/e
; npm version = 8.13.2
; cwd = /Users/myname/Desktop/e
; HOME = /Users/myname