标签: angular components command-line-interface angular7 generate
当我尝试在CLI上运行以下命令时,我收到以下错误:
ng generate component [component-name]
我不断得到:
Cannot read property 'sourceRoot' of undefined
我想我是在更新我使用的angular版本之后才开始得到它的。
请参阅回复以获取解决方案。
答案 0 :(得分:0)
要解决此问题,我必须转到Angular.json文件夹。
更新后,我便可以运行命令
没有问题