-1

C:\Users\neha>npm install -g @angular/cli C:\Users\neha\AppData\Roaming\npm\ng -> C:\Users\neha\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng

@angular/cli@6.0.8 postinstall C:\Users\neha\AppData\Roaming\npm\node_modules\@angular\cli node ./bin/ng-update-message.js

npm WARN rollback Rolling back node-pre-gyp@0.10.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\neha\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\fsevents\node_modules' npm WARN rollback Rolling back needle@2.2.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\neha\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\fsevents\node_modules' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\@angular\cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • @angular/cli@6.0.8 updated 1 package in 37.347s

C:\Users\neha>ng 'ng' is not recognized as an internal or external command, operable program or batch file.

Ric
  • 12,855
  • 3
  • 30
  • 36
Neha Singh
  • 19
  • 7
  • Possible duplicate of https://stackoverflow.com/questions/37227794/ng-command-not-found-while-creating-new-project-using-angular-cli – Asad Shakeel Jul 05 '19 at 12:28

2 Answers2

0

Just add %AppData%\npm; to the user variable(since %AppData% dir is depending on user) PATH to fix it.

Related issue on Github

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
0

You only need to link it to npm using npm link @angular/cli

that worked for me

Asad Shakeel
  • 1,949
  • 1
  • 23
  • 29