幽灵JS崩溃 - 退出代码126

6

我在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

我似乎找不到有关这种崩溃类型的好文档。这是常见问题并值得报告 bug 吗?

更新:

这是我的文件权限:

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

12
听起来它不适用于你试图在其上运行的平台。确保在克隆存储库到新平台时删除node_modules目录并进行全新的npm install。当前不应将node_modules目录与源代码控制一起包括,只需维护好package.json文件,并为每个存储库克隆执行npm installnpm update。此外,如果使用git,请将node_modules/添加到您的.gitignore文件中,这样当您添加更改并提交时就不必担心意外包含它了。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接