minus.273
minus.273

Reputation: 777

npm not running after Node upgrade

I upgraded Node from version 10.17 to 12.6.1 on my Windows 10 Pro x64 machine and npm does not run. The error i get is:

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

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15) at Function.Module._load (internal/modules/cjs/loader.js:864:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at internal/main/run_main_module.js:18:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } internal/modules/cjs/loader.js:985 throw err; ^

I have tried so far:

My system Path variable contains C:\Program Files\nodejs\ and my user Path variable contains C:\Program Files\nodejs\;C:\Users\{User}\AppData\Roaming\npm

What am I missing here? Can anyone guide me?

Upvotes: 0

Views: 295

Answers (1)

dvd
dvd

Reputation: 56

I moved the folder of node to the folder of the project end update the path end it finally solved the problem no idea why

Upvotes: 0

Related Questions