node npm install -g cannot find module config-chain
node.js, npm
Solution
`config-chain` is npm dependency, so chances are that your npm installation is broken.
Try to reinstall it, or use one of npm forks if npm itself isn't installable on your system for some reason.
Problem
I configured the node plugins on jenkins to install grunt and bower globally. When i use it on a project npm install is executed: ``` npm install -g bower@~1.2.8 grunt-cli@~0.1.11 ``` Unfortunally it breaks immediately returning the following error: ``` module.js:333 throw err; ^ Error: Cannot find module 'config-chain' at Function.Module._resolveFilename (module.js:331:15) at Function.Module._load (module.js:273:25) at Module.require (module.js:357:17) at require (module.js:373:17) at Object.<anonymous> (/Users/Shared/Jenkins/Home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_0.11.10/lib/node_modules/npm/node_modules/npmconf/npmconf.js:2:10) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:349:32) at Function.Module._load (module.js:305:12) at Module.require (module.js:357:17) ``` I dont think config-chain is an extra plugin necessary to be installed for it to be there. Any ideas how to fix this? Edit.: Fixed it thanks to the accepted answer: npm auto-install isnt supported for mac at this time. I had to download the package manually.