2016-11-30 77 views
0

我得到這個錯誤,試圖安裝一個npm包。你能幫忙嗎?npm mac OS X上的ENOENT錯誤 - 沒有這樣的文件或目錄

感謝

$ sudo npm install -g ios-deploy 
npm WARN lifecycle [email protected]~preinstall: cannot run in wd %s %s (wd=%s) [email protected] ./src/scripts/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-298c9491 
npm ERR! Darwin 15.2.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy" 
npm ERR! node v6.3.0 
npm ERR! npm v4.0.2 
npm ERR! path /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall chmod 

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy' 
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/ludovicroux/Documents/PROJETS/BOARDLINE/dev/boardline/npm-debug.log 

它只有

sudo npm install -g ios-deploy --unsafe-perm=true --allow-root 

回答

0

工作,我認爲這是root帳號下,不建議使用這種運行NPM的問題。

要在您所有的計算機NPM沒有sudo標誌運行了,你可以安裝nvm -stands爲ň頌歌v版爲 anager。它允許您擁有多個節點版本,並且可以在不使用root帳戶(sudo命令)的情況下安裝--global軟件包。

您可以安裝自己的隸書進行安裝:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

希望它能幫助。

+0

thanks @jorge,without sudo我得到EACCESS錯誤.... – Louis

+0

當然!但你必須先安裝nvm! – Jorge

+0

;)好的,我剛剛使用腳本安裝了nvm。 'sudo npm install -g ios-deploy'仍然存在ENOENT錯誤。但似乎'npm install -g ios-deploy'正在工作...... – Louis

相關問題