加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

【Angular2】You have to be inside an angular-cli project in

发布时间:2020-12-17 09:13:42 所属栏目:安全 来源:网络整理
导读:背景 需要在项目中建立自己的component 定位到具体的目录下;输入ng g component my-indivi dual-information 就会显示如下问题,无法创建component 问题 在控制台提示如下问题: You have to be inside an angular-cli project in order to use the generat

背景

需要在项目中建立自己的component
定位到具体的目录下;输入ng g component my-indivi
dual-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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读