当我尝试进行npm安装时,我收到此错误...我对此感到震惊了将近4天......请有人帮帮我...
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Users\\Username\\AppData\\Roaming\\npm\\node_modules\\n pm\\bin\\npm-cli.js" "install"
npm ERR! node v0.10.33
npm ERR! npm v2.1.5
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs@1.9.12 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs@1.9.12 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
答案 0 :(得分:5)
我在Windows上遇到了完全相同的问题。为了解决这个问题,我采取了以下步骤:
PHANTOMJS_HOME
)。npm install
或具体而言,npm install phantomjs@1.9.12
应该正常工作。您可以使用git bash shell或命令提示符中的where phantomjs
和phantomjs -v
来测试本地phantomjs可执行安装。
答案 1 :(得分:0)
我在公司代理下工作,因此它阻止npm从https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip下载“ phantom”
因此,我通过以下方式对其进行了修复...