I'm trying to use Jenkins to run mocha test of NodeJS project.
I'm using Jenkins 1.602.
I've install NodeJS Plugin version 0.2.1
I've configure node installation for Node JS 0.10.35 as I'm using Heroku and that the latest stable version they use.
The problem is when I try to install mocha for global use I get this error:
Unpacking http://nodejs.org/dist/v0.10.35/node-v0.10.35-darwin-x64.tar.gz to /Users/Shared/Jenkins/Home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Heroku_NodeJS on Jenkins
$ /Users/Shared/Jenkins/Home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Heroku_NodeJS/bin/npm install -g mocha
module.js:340
throw err;
^
Error: Cannot find module 'config-chain'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/Shared/Jenkins/Home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Heroku_NodeJS/lib/node_modules/npm/node_modules/npmconf/npmconf.js:2:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Even If I manually copy the config-chain package to node_modules of npm directory I get error for another missing module.