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\_logs2019円-11-26T21_34_00_712Z-debug.log
jonrsharpe
123k31 gold badges278 silver badges489 bronze badges
asked Nov 26, 2019 at 21:40
user12011141
-
1did you install node.js? You may need to explain more about your setupHans Kesting– Hans Kesting2019年11月26日 21:42:14 +00:00Commented Nov 26, 2019 at 21:42
-
Yes I have installed node js and when running node -v I get v10.16.3.user12011141– user120111412019年11月26日 21:47:08 +00:00Commented Nov 26, 2019 at 21:47
-
Check this: stackoverflow.com/questions/23412938/…ulmas– ulmas2019年11月26日 22:07:05 +00:00Commented 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?user12011141– user120111412019年11月26日 22:20:08 +00:00Commented Nov 26, 2019 at 22:20
1 Answer 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
lang-js