2013-09-25 43 views
6

当我尝试在CentOS(64位)系统的工作流程中运行phantomJS时,出现一个奇怪的问题。PhantomJS崩溃 - 退出代码126

这里是它的报告错误:

[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 

我似乎无法找到这种类型的任何飞机坠毁的好文件。这是否通常和/或值得一个错误报告?

UPDATE:

这些都是我的文件权限:

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

回答

12

听起来像它不是你想上运行它的平台上构建。确保删除node_modules目录,并在将存储库克隆到新平台时执行新的npm install。将您的node_nodules目录纳入您的源代码管理目前是一种不好的做法。只要保持您的package.json文件保持良好,并为每个回购克隆执行npm installnpm update。另外,如果您使用的是git,请将node_modules/添加到您的.gitignore文件中,以便您在添加更改和提交时不必担心意外地包含它。