admin管理员组

文章数量:1278655

I'm getting a strange issue when trying to run phantomJS in my workflow on a CentOS (64bit) system.

Here is the error it's reporting:

[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

I can't seem to find any good documentation on this type of crash. Is this usual and/or worthy of a bug report?

UPDATE:

These are the permissions on my file:

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

I'm getting a strange issue when trying to run phantomJS in my workflow on a CentOS (64bit) system.

Here is the error it's reporting:

[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

I can't seem to find any good documentation on this type of crash. Is this usual and/or worthy of a bug report?

UPDATE:

These are the permissions on my file:

-rwxr-x--x. 1 root root 11308856 Sep 26 12:39 phantomjs
Share Improve this question edited Sep 30, 2013 at 12:15 EhevuTov 20.5k16 gold badges68 silver badges71 bronze badges asked Sep 25, 2013 at 19:46 streetlightstreetlight 5,96813 gold badges66 silver badges102 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 12

Sounds like it's not built for the platform you're trying to run it on. Make sure to delete your node_modules directory and do a fresh npm install when you clone your repository to a fresh platform. It's currently bad practice to include your node_nodules dir in with your source control. Just keep your package.json file maintained well and do a npm install or npm update for each repo clone. Also, add node_modules/ to your .gitignore file if you're using git so you don't have to worry about accidently including it when you add changes and mit.

本文标签: javascriptPhantomJS CrashExit Code 126Stack Overflow