These should be the steps:
npm install -g @angular/cli //corrected from 'angular-cli'
ng new projectname
cd projectname
ng serve
open http://localhost:4200
它发生在我身上,我试图在一个用Ruby on Rails创建的项目中执行ng服务命令。换句话说,我必须为Ruby on Rails运行rails - s命令。
我很困惑,因为Angular是内置在Ruby on Rails中的,所以我必须运行rails - s命令来启动我的项目的本地服务器,而且它工作起来没有问题
run "npm install" command(creating node modules),
then run "npm audit fix --force"
and then run "ng build",(building project)
and "ng serve" (runnning project)