More than one module matches. use skip-import option to skip importing the component into the closest module.
Answers
And fail with this error! Error: Multiple modules match. Use the skip-import option to exclude importing the components to the nearest module.
In this case, the error clearly tells you what is wrong with the project, but it is not clear for some reasons. Basically the problem is that you have multiple modules in the angle app for your root level.
So when you try to generate a new element using Angular CLI, it tries to import and register newly created content in your app.module.
Some one when try to create a component in the methodology of angular cli, it may show them this kind of error of the following category, and need to be get rid off.
The means of get rid of it is: Error: Multiple , and more than one module is found to match.
The method of skip-import option to skip importing the component into the closest module may be tried to get a better result.
2) Second example to get rid of the error in the subject when one use the CLI to make and create a new component say: ng g c my-component --project=my-project, results to the creation of null component.With similar kind of error message I have found some other posts too.But in any of those Nrwl/Nx is not included.
I somewhere feel these should be included.
Project started as Ng4 and was upgraded to Ng6.This method may be tried:
Node: 8.9.4.OS: win32 x64.
Angular: 6.0.6.@angular-devkit/architect 0.6.8.@angular-devkit/build-angular 0.6.8.@angular-devkit/build-optimizer 0.6.8.@angular-devkit/core 0.6.8.@angular-devkit/schematics 0.6.8.@angular/cdk 6.3.1.@angular/cli 6.0.8.@angular/material 6.3.1.@ngtools/webpack 6.0.8.@schematics/angular 0.6.1.@schematics/update 0.6.8.typescript 2.7.2.webpack 4.8.3.nrwl/nx 6.1.0.rxjs 6.2.1Hence the solution.