【问题标题】:PhantomJS Crash - Exit Code 126PhantomJS 崩溃 - 退出代码 126
【发布时间】:2013-10-01 13:49:50
【问题描述】:

尝试在 CentOS(64 位)系统上的工作流程中运行 phantomJS 时遇到一个奇怪的问题。

这是它报告的错误:

[4mRunning "qunit:all" (qunit) task[24m Testing http://localhost:8000/tests.html 

Running PhantomJS...[31mERROR[39m
[31m>> [39m/home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: cannot execute binary file 0 [ '/home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: cannot execute binary file' ]

[33mWarning: PhantomJS exited unexpectedly with exit code 126. Use --force to continue.[39m

[31mAborted due to warnings.[39m

我似乎找不到任何关于此类崩溃的好文档。这通常和/或值得报告错误吗?

更新:

这些是我文件的权限:

-rwxr-x--x. 1 root root 11308856 Sep 26 12:39 phantomjs

【问题讨论】:

    标签: javascript node.js jenkins phantomjs gruntjs


    【解决方案1】:

    听起来它不是为您尝试运行它的平台而构建的。当您将存储库克隆到新平台时,请确保删除您的node_modules 目录并执行新的npm install。目前将node_nodules 目录包含在源代码管理中是不好的做法。只需保持您的 package.json 文件维护良好,并为每个 repo 克隆执行 npm installnpm update。此外,如果您使用的是 git,请将 node_modules/ 添加到您的 .gitignore 文件中,这样您就不必担心在添加更改和提交时意外包含它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-02-08
      • 2016-08-11
      • 2013-08-17
      • 1970-01-01
      • 2019-04-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多