Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

internal/modules/cjs/loader.js:584 issue

I got a problem when I input any npm cmd, it says

internal/modules/cjs/loader.js:584

Operating System: Windows 10 64bit

What shall I do to solve this issue?

internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'E:\FED\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
like image 248
Stan Lee Avatar asked Mar 28 '19 01:03

Stan Lee


1 Answers

For many people on Mac (not sure about Windows/Linux), the solution is:

Delete node_modules and package-lock.json, then run $ npm install again.

You can also try updating your version of node.

Check version with $ node -v, install with $ sudo n stable

like image 150
Serdar Mustafa Avatar answered Oct 19 '22 00:10

Serdar Mustafa