{"id":2158,"date":"2017-12-07T11:50:31","date_gmt":"2017-12-07T11:50:31","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2158"},"modified":"2020-01-09T09:45:04","modified_gmt":"2020-01-09T09:45:04","slug":"error-cannot-find-module-graceful-fs","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/error-cannot-find-module-graceful-fs\/","title":{"rendered":"Error: Cannot find module &#8216;graceful-fs&#8217;"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Error: Cannot find module &#8216;graceful-fs&#8217;<\/strong><br \/>\nError &#8211; <\/p>\n<p>Error: Cannot find module &#8216;graceful-fs&#8217;<br \/>\nat Function.Module._resolveFilename (module.js:331:15)<br \/>\nat Function.Module._load (module.js:273:25)<br \/>\nat Module.require (module.js:357:17)<br \/>\nat require (module.js:373:17)<br \/>\nat Object.<anonymous> (\/usr\/share\/npm\/lib\/utils\/ini.js:32:10)<br \/>\nat Module._compile (module.js:449:26)<br \/>\nat Object.Module._extensions..js (module.js:467:10)<br \/>\nat Module.load (module.js:349:32)<br \/>\nat Function.Module._load (module.js:305:12)<br \/>\nat Module.require (module.js:357:17)<br \/>\nroot@mtv-ubld-39:~\/node\/npm\/scripts# export NODE_PATH=\/usr\/lib\/nodejs\/graceful-fs.js<br \/>\nroot@mtv-ubld-39:~\/node\/npm\/scripts# echo $NODE_PATH<br \/>\n\/usr\/lib\/nodejs\/graceful-fs.js<br \/>\nroot@mtv-ubld-39:~\/node\/npm\/scripts# echo $NODE_PATH<br \/>\n\/usr\/lib\/nodejs\/graceful-fs.js<\/p>\n<p>Solution <\/p>\n<p>Your npm isn&#8217;t properly installed. Execute (as root):<\/p>\n<p>curl npmjs.org\/install.sh | bash<\/p>\n<p>This reinstalls npm on your computer, it should work afterwards.<\/p>\n<p>You might need to restart your shell after that for the changes to take effect.<\/p>\n<p>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&#8217;s package manager first, e.g.<\/p>\n<p>sudo apt-get remove npm<\/p>\n<p>Or<\/p>\n<p><a href=\"http:\/\/www.scmgalaxy.com\/48-other-build-tools\/2...ind-local-grunt.html\" target=\"_blank\" rel=\"noopener\">www.scmgalaxy.com\/48-other-build-tools\/2&#8230;ind-local-grunt.html<\/a><br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Error: Cannot find module &#8216;graceful-fs&#8217; Error &#8211; Error: Cannot find module &#8216;graceful-fs&#8217; 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&#8230;. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[297],"class_list":["post-2158","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-module"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2158"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2158\/revisions"}],"predecessor-version":[{"id":2159,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2158\/revisions\/2159"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}