1

I am having trouble installing Angular globally. I have included the error below.

C:\Users\DevSa\ng -> C:\Users\DevSa\node_modules\@angular\cli\bin\ng

> @angular/[email protected] postinstall C:\Users\DevSa\node_modules\@angular\cli
> node ./bin/postinstall/script.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @angular/[email protected] postinstall: `node ./bin/postinstall/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @angular/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DevSa\AppData\Roaming\npm-cache\_logs\2019-11-26T21_34_00_712Z-debug.log
4
  • 1
    did you install node.js? You may need to explain more about your setup Commented Nov 26, 2019 at 21:42
  • Yes I have installed node js and when running node -v I get v10.16.3. Commented Nov 26, 2019 at 21:47
  • Check this: stackoverflow.com/questions/23412938/… Commented Nov 26, 2019 at 22:07
  • I've already done this several times and it just won't solve the issue. Have any other suggestions? Commented Nov 26, 2019 at 22:20

1 Answer 1

1

Add C:\Program Files\nodejs\ at the top of your environment variables PATH list and then C:\Users\{your username}\AppData\Roaming\npm below it.

Hope solves your issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.