Angular 创建组件报错 More than one module matches. Use skip-import option to skip importing the component into the closest module.

 

ng g c new-component-name 

 

Your global Angular CLI version (12.2.9) is greater than your local version (9.1.7). The local Angular CLI version is used.

 

To disable this warning use "ng config -g cli.warnings.versionMismatch false".

 

 

More than one module matches. Use skip-import option to skip importing the component into the closest module.

解决办法:

ng g c new-component-name --module app

 

 

 

Your global Angular CLI version (12.2.9) is greater than your local version (9.1.7). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".More than one module matches. Use skip-import option to skip importing the component into the closest module.

posted @ 2021-11-18 14:37  三瑞  阅读(241)  评论(0编辑  收藏  举报