【Angular4】You have to be inside an Angular CLI project in order to use the serve command.

前端之家收集整理的这篇文章主要介绍了【Angular4】You have to be inside an Angular CLI project in order to use the serve command.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

今天在启动项目时ng servecnpm start时,突然报如下错误

问题1:
  You have to be inside an Angular CLI project in order to use the serve command.

尝试1:
  输入:cnpm install -g @angular/cli@latest,再次启动还是不行,报如下错误


问题2:

  经查资料和再看错误提示,人家都给出提示了,于是进行了再次尝试:

尝试2:
  输入:cnpm install --save-dev @angular/cli@latest

再次启动:ng serve 启动成功!

原文链接:https://www.f2er.com/angularjs/144711.html

猜你在找的Angularjs相关文章