I am trying to generate a component called \"hero\" using \"ng generate component hero\" in the cmd line and am getting the following message:
Error: You
for an hour was solving the same, eventually concluded:
1. My global and local CLI mismatched (1.6.4 g vs 1.6.3 l),
so I ran npm install --save-dev @angular/cli@latest
2. After that that was another warning:
"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.",
so ng g c my-component --skip-import
now works as expected.
I hope it will help.