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:
All the answers and solutions on this question and the issue still persists.
Uninstalling Node, deleting all npm, node_modules and node folders on Program Files and AppData, rebooting, installing node again, rebooting and it still did not work.
Reinstalling npm as per the instructions here
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?