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.
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 rebuildor simply remove yournode_modulesandnpm installfrom 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.
sounds like a duplicate of https://github.com/nodejs/node/issues/9377
EDIT: maybe https://github.com/nodejs/node/issues/9377#issuecomment-258911774 ?
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_modulesand runnpm cache cleanandnpm installworks 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
Most helpful comment
Removing
node_modulesand runnpm cache cleanandnpm installworks for me.