2016-08-28 125 views
0

我正嘗試在我的Macbook上安裝早午餐。我在在Mac上安裝早午餐

npm install -g brunch 

類型和它最終輸出

npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "brunch" 
npm ERR! node v6.4.0 
npm ERR! npm v3.10.3 
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/aryaman.arora/npm-debug.log 

我應該怎麼辦?

回答

1

運行命令具有超級用戶權限:

sudo npm install -g brunch

注:這需要root密碼。

或者您可以使用this guide修復npm的權限。

+0

我已經嘗試過了,我也嘗試過使用root權限。我會檢查指南。 –

+0

指南工作!非常感謝。 –