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/cli@8.3.19 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/cli@8.3.19 postinstall: `node ./bin/postinstall/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @angular/cli@8.3.19 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
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • 1
    did you install node.js? You may need to explain more about your setup – Hans Kesting Nov 26 '19 at 21:42
  • Yes I have installed node js and when running node -v I get v10.16.3. –  Nov 26 '19 at 21:47
  • Check this: https://stackoverflow.com/questions/23412938/node-is-not-recognized-as-an-internal-or-an-external-command-operable-program – ulmas Nov 26 '19 at 22:07
  • I've already done this several times and it just won't solve the issue. Have any other suggestions? –  Nov 26 '19 at 22:20

1 Answers1

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.

Vipulw
  • 1,253
  • 5
  • 12