运行
ng generate component hello
命令出现下面问题
Error: More than one module matches. Use skip-import option to skip importing the component into the closest module.
More than one module matches. Use skip-import option to skip importing the component into the closest module.
根据提示再次运行
ng generate component hello --module=app.module
然后出现错误
Error: Specified module does not exist
Specified module does not exist
试了多种方法都找不出问题所有
后来发现原来自己的app有多个.module文件就会导致CLI出错,把多个module合并成一个解决问题