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


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.