首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在幻影中失败-预构建@2.1.13安装脚本“节点install.js”

在幻影中失败-预构建@2.1.13安装脚本“节点install.js”
EN

Stack Overflow用户
提问于 2016-12-06 09:44:23
回答 5查看 38.4K关注 0票数 16

我正试图在windows 7机器上安装幻影,并得到了这个错误。

代码语言:javascript
运行
复制
npm ERR! Windows_NT 6.1.7601  
npm ERR! argv "C:\\Program Files (x86)\\nodist\\v\\nodev5.5.0\\node.exe"   "C:\\Program Files (x86)\\nodist\\bin\\node_mod  
ules\\npm\\bin\\npm-cli.js" "install"  
npm ERR! node v5.5.0  
npm ERR! npm  v3.10.9  
npm ERR! code ELIFECYCLE  

npm ERR! phantomjs-prebuilt@2.1.13 install: `node install.js`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the phantomjs-prebuilt@2.1.13 install script 'node   install.js'.  
npm ERR! Make sure you have the latest version of node.js and npm installed.

在幻影github或this中记录了许多问题,所以有疑问,但在我的情况下,这些问题都没有帮助。

这就是我的机器的状态

  • 我在C:\npm\phantomjs-2.1.1-windows\bin\phantomjs.exe本地安装了幻影,但是当我运行npm安装时,它总是尝试通过下载来安装,这就是me.My公司代理的问题所在,直接下载.I也不能使用这里提到的--phantomjs_cdnurl开关( https://www.npmjs.com/package/phantomjs#deciding-where-to-get-phantomjs )。
  • 我可以运行这个命令,它可以很好地运行phantomjs -v2.1.1

但是,当我在我的项目上运行npm install时,它试图安装幻影is,并且会遇到我从npm日志中观察到的上述error.Another事件。

Considering PhantomJS found at C:\Program Files (x86)\nodist\bin\phantomjs.CMD Found PhantomJS at C:\Program Files (x86)\nodist\bin\phantomjs.CMD ...verifying Error verifying phantomjs, continuing { [Error: Command failed: C:\Program Files (x86)\nodist\bin\phantomjs.CMD --version

它正在尝试运行phantomjs.CMD --版本也失败了。

代码语言:javascript
运行
复制
Error verifying phantomjs, continuing { [Error: Command failed: C:\Program Files (x86)\nodist\bin\phantomjs.CMD --versio
n
internal/child_process.js:274
  var err = this._handle.spawn(options);
                         ^

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:274:26)
    at exports.spawn (child_process.js:362:9)
    at Object.<anonymous> (C:\Program Files (x86)\nodist\bin\node_modules\phantomjs-prebuilt\bin\phantomjs:22:10)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:139:18)
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Program Files (x86)\\nodist\\bin\\phantomjs.CMD --version' }
EN

Stack Overflow用户

发布于 2019-07-15 13:44:11

我遇到了同样的错误,它将通过以下变化来解决,希望它能帮助你。

代码语言:javascript
运行
复制
sudo npm install phantomjs-prebuilt@2.1.13 --unsafe-perm
票数 2
EN
查看全部 5 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40992231

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档