2014-10-30 149 views
7

我正在尝试执行npm安装时出现此错误...我碰到这个将近4天......请有人帮我解决.. 。npm安装错误在[email protected]安装脚本失败

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! [email protected] install: `node install.js` 
npm ERR! spawn ENOENT 
npm ERR! 
npm ERR! Failed at the [email protected] 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

我不确定是否有帮助,但在这里,我与ENOENT问题,因为缺乏bzip和tar utils。 – ton 2015-04-13 22:13:22

回答

5

我在Windows上有完全相同的问题。为了解决这个问题,我采取了以下措施:

  1. 安装最新版本的phantomjs(目前,phantomjs-1.9.8-窗)的地方,通过下载和unziping。我以前的版本与phantomjs npm软件包不兼容。
  2. 更新您的环境变量以指向最新版本的phantomjs.exe(PHANTOMJS_HOME)。
  3. 退出并重新启动windows提示符或shell来识别变量。
  4. 现在,npm install或特别是,npm install [email protected]应该正常工作。

您可以测试你的本地phantomjs可执行文件从一个git的bash shell或命令提示符下where phantomjsphantomjs -v安装。

+0

Gary提出的解决方案是一个很好的解决方案。我相信你会看到这个问题,因为你没有安装'python'和'Visual Studio'。这些都是您自己构建幻像二进制插件所必需的。 如果您下载预构建的二进制文件,则不必安装它们。 – 2014-12-27 18:46:28

相关问题