Error: EACCES: permission denied, unlink '/usr/local/bin/npm'


(luca hermann) #1

hi there i just begin my adventure with npm and i got this issue when i try to run npm install -g npm@latest i have reinstall the stable version of node with nvm but i still in trouble …

sys config : Darwin devnullmacbook.local 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64

node version : v8.12.0

npm ERR! path /usr/local/bin/npm
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink
npm ERR! Error: EACCES: permission denied, unlink ‘/usr/local/bin/npm’
npm ERR! { Error: EACCES: permission denied, unlink ‘/usr/local/bin/npm’
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, unlink ‘/usr/local/bin/npm’
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘/usr/local/bin/npm’ },
npm ERR! stack: ‘Error: EACCES: permission denied, unlink ‘/usr/local/bin/npm’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘/usr/local/bin/npm’ }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/luca/.npm/_logs/2018-10-18T11_24_46_271Z-debug.log

thank for help me have a good day !!


(system) #2

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.