2011-11-17 195 views
2
I keep having errors when trying to install coffeescript. 
node version v0.6.1 
npm version 1.0.106 

npm ERR! Could not create /usr/local/lib/node_modules/___coffee-script.npm 
npm ERR! error installing [email protected] Error: EACCES, permission denied '/usr/local/lib/node_modules/___coffee-script.npm' 
npm ERR! Error: EACCES, permission denied '/usr/local/lib/node_modules/___coffee-script.npm' 
npm ERR! Report this *entire* log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 
npm ERR! 
npm ERR! System Darwin 11.2.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "coffee-script" 
npm ERR! cwd /Users/Thomas 
npm ERR! node -v v0.6.1 
npm ERR! npm -v 1.0.106 
npm ERR! path /usr/local/lib/node_modules/___coffee-script.npm 
npm ERR! code EACCES 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/Thomas/npm-debug.log 
npm not ok 

權限被拒絕,我發現你不應該sudo。 請提前幫助和感謝。npm coffescript安裝錯誤


奧凱所有解決使用sudo的幫助,但如果任何人有任何想法如何改變我的/ usr/local/lib目錄權限,這將是appriciated

+0

是的,我不知道,如果NPM可與節點尚未0.6。 – bithavoc

+0

我認爲NPM的作品,但它像一個文件權限錯誤或什麼的。不知道PLZ幫助 – lostAstronaut

+0

我sudo安裝它,它沒有問題。如果有人有不同的解決方案,儘管它將不勝感激。 – lostAstronaut

回答

2

我要做的就是:

sudo chown -R $USER /usr/local

這樣的話,你可以安裝任何你在/usr/local想不sudoing :)