Node: Error: Cannot find module 'internal/fs'

Created on 17 Nov 2016  路  10Comments  路  Source: nodejs/node

Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at evalmachine.:17:20

duplicate install npm

Most helpful comment

Removing node_modules and run npm cache clean and npm install works for me.

All 10 comments

Remove your node_modules directory and run npm install.

Edit: I don't know what your reason @quarterto was for giving me thumbs down, but here is the official note about OP error.
https://nodejs.org/en/blog/release/v7.0.0/

The release notes below are annotated with the main breaking changes. Note that because this new version of Node.js is shipping with a new version of V8, existing native addons will need to be recompiled or runtime errors will occur when trying to load them. Use npm rebuild or simply remove your node_modules and npm install from scratch.

The thumbs down was a little rash, i'm sorry. I ran into this issue, and that didn't initially fix it for me. The trouble is I ran into this error in _npm itself_, which hadn't updated when I installed node 7 via n. I needed to downgrade to node 6 and reinstall npm to fix it.

Closing for lack of response.

Removing node_modules and run npm cache clean and npm install works for me.

@willyelm year, also work for me! thanks

@willyelm this solution works for me too thank you!

I have the same issue. did u solved it??

@SuunZhu did you try the suggested solutions?

Removing node_modules and run npm cache clean and npm install works for me.

In windows 10 I downgraded from 8.1.0 to 6.11.0 then did the npm install npm@latest -g then upgraded node back to 8.1.0. That worked for me

Was this page helpful?
0 / 5 - 0 ratings