angular cli创建组建报错的解决办法

1.执行ng g component 组件名,报错:

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 g component 组件名 --skip-import,报错信息变了,如下:

Error: dryRunSink.commit(...).ignoreElements is not a function

dryRunSink.commit(...).ignoreElements is not a function


最终解决办法为:

先执行:npm i @angular-devkit/schematics@0.0.45 @angular/cli --no-sav

再执行:ng g component 组件名 --skip-import

问题解决!!

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容