尝试安装npm软件包时出现此错误。你能帮忙吗?
由于
rngAll
仅适用于
$ sudo npm install -g ios-deploy
npm WARN lifecycle ios-deploy@1.9.0~preinstall: cannot run in wd %s %s (wd=%s) ios-deploy@1.9.0 ./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
答案 0 :(得分:0)
我认为这是在root帐户下运行npm的问题,这是不鼓励的。
要在没有sudo标志的情况下运行所有计算机npm,您可以为 n ode v ersion m <安装nvm
STRONG> anager。它允许您在不使用root帐户(sudo命令)的情况下拥有许多节点版本以及安装--global
包。
您可以安装他们的官方脚本来安装它:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
希望它有所帮助。