nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.79k stars 1.31k forks source link

Getting error 'npm ERR! code ELIFECYCLE' when run nightwatch test on Jenkins #1638

Closed fedika closed 6 years ago

fedika commented 6 years ago

Dear NightwatchJs, Currently I am setting up Jenkins to run my NightwatchJS test. Everything is okay until command npm run e2e-test

this is a part of package.json:

"scripts": {
"e2e-test": "nightwatch"
}

Here is the shell command on Jenkins build

echo $PATH
node --version
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install nightwatch --save-dev
npm install selenium-download --save-dev
npm install env2 --save-dev
npm install cucumber --save-dev
npm install nightwatch-cucumber --save-dev
npm install nightwatch-html-reporter --save-dev
node nightwatch.conf.js
npm run e2e-test

But when execute npm run e2e-test, it produces error

  • npm run e2e-test

ilm-mobileweb-nightwatchjs@1.0.0 e2e-test C:\Program Files (x86)\Jenkins\workspace\NightwatchJS Mobile Web - PRD nightwatch

[1;35mStarting selenium server in parallel mode... [0m [1;35mstarted - PID: [0m 11196

Started child process for: [1;33m [40m login [0m

[1;33m [40m login [0mfinished.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ilm-mobileweb-nightwatchjs@1.0.0 e2e-test: nightwatch npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ilm-mobileweb-nightwatchjs@1.0.0 e2e-test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Windows\system32\config\systemprofile\AppData\Roaming\npm-cache_logs\2017-11-13T10_55_59_768Z-debug.log

Actually, this happened on Jenkins staging server, this is not happened on my local laptop. So I'm getting confused @_@'

Thank you

beatfactor commented 6 years ago

Please use the Mailing List or StackOverflow to ask for assistance. The GitHub Issues list is meant for submitting bugs and feature requests.