PhantomJS Crash - exit code 126

I get a strange problem when I try to run phantomJS on my workflow on a CentOS system (64 bit).

Here is the error message:

[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 not find good documentation on this type of failure. Is this normal and / or worthy of a bug report?

UPDATE:

These are permissions for my file:

 -rwxr-x--x. 1 root root 11308856 Sep 26 12:39 phantomjs 
+6
source share
1 answer

It seems that it is not designed for the platform on which you are trying to run it. Be sure to remove the node_modules directory and make a new npm install when you clone your repository to a new platform. It is currently bad practice to include your node_nodules dir in your control source. Just save the package.json file well and do npm install or npm update for each repo cloning. Also, add node_modules/ to your .gitignore file if you are using git , so you don’t have to worry about accidentally including it when you add changes and commit.

+12
source

Source: https://habr.com/ru/post/954633/


All Articles