I've installed node version 14.16.0 (according to an online course that I'm taking).
I've tried to install angular with npm using the command npm install -g @angular/cli@11.2.3 (again according to the course).
It threw an error so I ran npm --version to see if npm is working at all, and I got the same error.
Please notice that the path seems weird (C: drive is written twice).
This is the error:
$ npm --version
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\c\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72
:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\c\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72
:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}