I've been trying to install the Angular CLI via npm. My current node version is v11.2.0 and my npm version is 6.4.1.
After running the command npm install -g @angular/cli I get this output:
C:\Users\Mark O'Hare\AppData\Roaming\npm\ng -> C:\Users\Mark O'Hare\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
and when I try ng -v I get this error message:
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module 'C:\c\Users\Mark O'Hare\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:775:12)
at startup (internal/bootstrap/node.js:300:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:826:3)
Things I've tried so far:
- Uninstalling angular via npm and reinstalling
- Uninstalling node.js and deleting npm folders, restarting machine and reinstalling
- Creating alias's for 'ng' with the path to the ng file in the npm node_modules folder
So far none of these have worked. Can anyone help or suggest a workaround?