How do I remedy "Error: Cannot find module 'child-process-close'"? How do I remedy "Error: Cannot find module 'child-process-close'"? angularjs angularjs

How do I remedy "Error: Cannot find module 'child-process-close'"?


You’ll want to remove the node_modules folder using this command:

$ rm -rf /usr/local/lib/node_modules

Then re-install node:

$ brew uninstall node$ brew install node

That brings npm back to life.


On my machine, I had to make a couple of adjustments to @Believe2014 's response

$ rm -rf /usr/local/lib/node_modules

And then reinstall node as sudo

$ brew uninstall node$ sudo brew install node

Then npm behaved as expected for me, for example to install the Sails framework:

sudo npm install -g sails


Before re-installing node, make sure also that child-process-promise is added in package.json using this command:

npm install child-process-promise --save