2
votes

I am trying to execute an ng command in angular-cli project in my windows 10 PC. node v6.9.1

  • Globally installed the angular-cli.
  • Tried a fresh npm install.
  • Tried adding the path
    C:\Users\MohamadS\AppData\Roaming\npm\node_modules\angular-cli\bin in uservariables in the path variable.

Still it says as in the picture.

enter image description here

Need help with the issue.

PS- can't use any of the ng commands.( ng g c /componentName/, ng build)

Edited -

  • Tried the same angular-cli version in the project folder for the global installation as well.
1
Are you using cygwin? Maybe just using cmd prompt might make it work.chackerian
@chackerian Thanks for the reply. Tried with command prompt too. it says 'ng' is not recognized as an internal or external command, operable program or batch file. But, I do use conemu.Saiyaff Farouk
Check out this: answer Hope this will work for you.Avnesh Shakya
@AvneshShakya Thanks for the source. Seems it doesn't work and FYI - I've got Windows 10Saiyaff Farouk

1 Answers

3
votes

Checked whether npm path is added to system variable path, I had the npm v4.0.2 and I simply did an npm install npm@latest -g And once again installed angular-cli -g and now it's working.