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
问题解决!!
网友评论