I'm having some trouble running "npm" from Jenkins as a shell script. I added the NodeJS plugin for Jenkins and specified the latest version which I believe is 5.x. On my job configuration screen, I can successfully run "node --version", but when I try to run "npm --version" I'm getting this error:
+ node --version
v4.2.2
+ npm --version
module.js:339
throw err;
^
Error: Cannot find module 'are-we-there-yet'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous>
Any idea what might be causing the issue? Maybe something is broken with the NodeJS plugin?