2

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.
Saiyaff Farouk
  • 5,103
  • 4
  • 24
  • 38
  • Are you using cygwin? Maybe just using cmd prompt might make it work. – chackerian Dec 08 '16 at 03:04
  • 1
    @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 Dec 08 '16 at 03:11
  • Check out this: [answer](http://stackoverflow.com/questions/37991556/ng-is-not-recognized-as-an-internal-or-external-command) Hope this will work for you. – Avnesh Shakya Dec 08 '16 at 03:21
  • 1
    @AvneshShakya Thanks for the source. Seems it doesn't work and FYI - I've got Windows 10 – Saiyaff Farouk Dec 08 '16 at 03:49

1 Answers1

3

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.

Saiyaff Farouk
  • 5,103
  • 4
  • 24
  • 38