当我试图在CentOS (64位)系统上运行工作流中的CentOS时,我遇到了一个奇怪的问题。
下面是它报告的错误:
[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发布于 2013-09-27 12:56:52
听起来它不是为你想要运行的平台而建的。当您将存储库克隆到一个新的平台时,一定要删除您的node_modules目录并执行一个新的npm install。目前,将node_nodules dir包含在源代码管理中是一种糟糕的做法。只需维护好您的package.json文件,并为每个回购克隆做一个npm install或npm update。此外,如果使用的是node_modules/,则将.gitignore添加到git文件中,这样就不必担心在添加更改和提交时意外地包含它。
https://stackoverflow.com/questions/19013918
复制相似问题