OSX Sierra
@angular/cli: 1.0.0-rc.0
node: 7.1.0
ng g component [component-name]
installing component
Error locating module for declaration
SilentError: No module files found
I tried everything mentioned in #https://github.com/angular/angular-cli/issues/2962 to no avail. I moved app.module.ts all over the place and attempted to generate component from varying directory paths, same error.
if you have same name with app.*
in my project , I have app.router.module.ts in src/app . I move it to src/app/routers/app.router.module.ts, the error is hidden.
In my case i happen to have another .angular-cli.json file in my src folder. Removing it solved the problem
angular 4.1.1
angular-cli 1.0.1
oh great phacic is right. thank you
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
In my case i happen to have another
.angular-cli.jsonfile in my src folder. Removing it solved the problemangular 4.1.1angular-cli 1.0.1