node.js - npm packaged installed but can not be found when running nightwatch Jenkins -
i building node.js
project on jenkins
, came across wired error. detail description following (full console log shown @ end of question):
on jenkins
, after npm install
, tried run nightwatch e2e testing, following error message showed up:
iam-ui@0.0.1 test:e2e-chrome /users/shared/jenkins/home/workspace/e2e-iam-practice node_modules/nightwatch/bin/nightwatch --env chrome [0;31mthere error while starting test runner: [0;90merror: cannot find module 'q' @ function.module._resolvefilename (module.js:469:15) @ function.module._load (module.js:417:25) @ module.require (module.js:497:17) @ require (internal/module.js:20:19) @ object.<anonymous> (/users/shared/jenkins/home/workspace/e2e-iam-practice/node_modules/nightwatch/lib/runner/cli/clirunner.js:3:9) @ module._compile (module.js:570:32) @ object.module._extensions..js (module.js:579:10) @ module.load (module.js:487:32) @ trymoduleload (module.js:446:12) @ function.module._load (module.js:438:3) npm err! darwin 16.7.0 npm err! argv
it appears nightwatch.js looking node module called q
can not find it. tried @ node_modules after npm install
, found on jenkins console output:
+ echo 'node_modules , q\n\n' node_modules , q + ls -l node_modules/q/ total 272 -rw-r--r-- 1 jenkins jenkins 29828 mar 21 21:14 changes.md -rw-r--r-- 1 jenkins jenkins 1092 mar 21 21:09 license -rw-r--r-- 1 jenkins jenkins 25386 mar 21 21:09 readme.md -rw-r--r-- 1 jenkins jenkins 1721 sep 11 14:27 package.json -rw-r--r-- 1 jenkins jenkins 63932 mar 21 21:09 q.js -rw-r--r-- 1 jenkins jenkins 941 feb 18 2016 queue.js + echo 'nested node_modules , q\n\n' nested node_modules , q + ls -l node_modules/nightwatch/node_modules/q/ total 272 -rw-r--r-- 1 jenkins jenkins 29597 may 16 2015 changes.md -rw-r--r-- 1 jenkins jenkins 1092 may 16 2015 license -rw-r--r-- 1 jenkins jenkins 25760 may 16 2015 readme.md -rw-r--r-- 1 jenkins jenkins 1629 sep 11 14:27 package.json -rw-r--r-- 1 jenkins jenkins 62792 may 16 2015 q.js -rw-r--r-- 1 jenkins jenkins 941 may 16 2015 queue.js + npm run test:e2e-chrome
it shows both outer q
module , nested q
module inside nightwatch
installed. 1 have idea possibly reason ? thanks.
Comments
Post a Comment