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

后端 未结 30 2850
忘掉有多难
忘掉有多难 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:01

    Make sure angular-cli is installed before trying to create a project. Windows users can install angular-cli without giving permission to command but MAC users have to use sudo before executing the command as follow:

    sudo npm install -g angular-cli
    

    Type a password when asked and press enter to proceed.

提交回复
热议问题