Error: Cannot find module ‘graceful-fs’

Spread the Knowledge

rajeshkumar created the topic: Error: Cannot find module ‘graceful-fs’
Error –

Error: Cannot find module ‘graceful-fs’
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. (/usr/share/npm/lib/utils/ini.js:32: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)
root@mtv-ubld-39:~/node/npm/scripts# export NODE_PATH=/usr/lib/nodejs/graceful-fs.js
root@mtv-ubld-39:~/node/npm/scripts# echo $NODE_PATH
/usr/lib/nodejs/graceful-fs.js
root@mtv-ubld-39:~/node/npm/scripts# echo $NODE_PATH
/usr/lib/nodejs/graceful-fs.js

Solution

Your npm isn’t properly installed. Execute (as root):

curl npmjs.org/install.sh | bash

This reinstalls npm on your computer, it should work afterwards.

You might need to restart your shell after that for the changes to take effect.

In some cases even the installer fails because of the graceful-fs error, in this case you might need to remove npm using your distribution’s package manager first, e.g.

sudo apt-get remove npm

Or

www.scmgalaxy.com/48-other-build-tools/2…ind-local-grunt.html
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Rajesh Kumar
Latest posts by Rajesh Kumar (see all)