我保持收到此錯誤,當我在Mac OS上運行npm install -g angular-cli
:角CLI安裝錯誤
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/apple/npm-debug.log
你正試圖在全局安裝一個模塊,爲了做到這一點,你需要使用更高的權限來執行,運行'npm install -g angular-cli'作爲'root'用戶 - 'sudo npm install -g angular- cli' – mic4ael
謝謝你的工作。 – calibre24