简体   繁体   中英

ng:command not found in node v6.9.1

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.

在此处输入图片说明

Need help with the issue.

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

Edited -

  • Tried the same angular-cli version in the project folder for the global installation as well.

检查是否将npm path添加到系统变量路径中,我安装了npm v4.0.2,我只是简单地做了一个npm install npm @ latest -g并再次安装了angular-cli -g现在它可以工作了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM