This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9037|Reply: 0

[Angular] More than one module matches. Use skip-import option to skip importing...

[Copy link]
Posted on 6/17/2020 5:19:41 PM | | | |
In my execution the Create angular component command, it is as follows:


The error is as follows:

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

Error causes:The problem arises because there are multiple files in the .module.ts in this project, and it is not possible to be sure to import the component into that module when it is created, so it is specified by --module.

The resolution command is as follows:


Or skip the import of components


As shown below:



This is because I enable the ssr function, and the framework automatically creates an AppServerModule module with the following code:

(End)





Previous:The difference between "!=" and "<>" in SQL statements
Next:Angular 9 series (VIII) updates the value of a child component by triggering an event via set
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com