ng: command not found while creating new project using angular-cli

后端 未结 30 2905
忘掉有多难
忘掉有多难 2020-11-28 23:42

Installed angular-cli globally using (npm install -g angular-cli) but when I\'m trying to create project using ng new my-project it is throwing err

30条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 00:10

    This worked for me:

    1. Go to C:\Users{{users}}\AppData\Roaming and delete the npm folder
    2. Uninstall node and install it again
    3. Run the command to install angular cli

      npm install -g @angular/cli
      

提交回复
热议问题