angular cli创建组建报错的解决办法
2019-08-20 本文已影响0人
yudian123
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
问题解决!!