[1.4.0-beta.2] "more than one module matches" error when it should not
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [X] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.4.0-beta.2 node: 8.4.0 os: darwin x64
Repro steps.
ng g component hello
create src/app/hello/hello.component.css (0 bytes)
create src/app/hello/hello.component.html (24 bytes)
create src/app/hello/hello.component.spec.ts (621 bytes)
create src/app/hello/hello.component.ts (265 bytes)
update src/app/app.module.ts (392 bytes)
ng g module shared
create src/app/shared/shared.module.ts (190 bytes)
ng g component hi
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.
The log given by the failure.
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.
Desired functionality.
Using 1.3.x the same command adds the component to the root module.
installing component
create src/app/hi/hi.component.css
create src/app/hi/hi.component.html
create src/app/hi/hi.component.spec.ts
create src/app/hi/hi.component.ts
update src/app/app.module.ts
Issue Analytics
- State:
- Created 6 years ago
- Comments:19
Top Results From Across the Web
Error: More than one module matches. Use skip-import ...
Use skip-import option to skip importing the component into the closest module. I'm using angular cli version: 1.4.1. angular.
Read more >Angular Error More than one module matches. - YouTube
Shared Modules in Angular - How to do it in 10 minutes · Top 5 Excel Functions for Finance People (with end-to-end example)...
Read more >Release Notes - Play services
December 15, 2022. The latest update to the Google Play services Matter library upgrades the APIs from beta status to generally available.
Read more >Changelog | Meteor API Docs
Throwing an error when the login tokens are not generated well calling requestLoginTokenForUser. PR. Node updated to v14.19.3; npm update to v6.14.17; Fix ......
Read more >1. ConfigObj 5 Introduction and Reference
ConfigObj - a Python module for easy reading and writing of config files. ... 1.4.1. Reading a Config File; 1.4.2. Writing a Config...
Read more >
Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
try
ng g component hi --module app
As the warning says, It’s because you have more than one module
You can solve it by specifying the name of the module you want to import the component to it.
ng generate component componentName --module=app.module