您的位置:首页 > Web前端 > AngularJS

【Angular2】You have to be inside an angular-cli project in order to use the generate command

2017-06-03 16:08 691 查看

背景

需要在项目中建立自己的component

定位到具体的目录下;输入ng g component my-individual-information

就会显示如下问题,无法创建component

问题



在控制台提示如下问题:

You have to be inside an angular-cli project in order to use the generate command

解决

npm install -g @angular/cli@latest

参考网址:

https://stackoverflow.com/questions/39133782/you-have-to-be-inside-an-angular-cli-project-in-order-to-use-the-build-command-a

https://stackoverflow.com/questions/40868455/how-to-set-folders-to-angular-cli-commands
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐