Skip to content

"No module files found" error when trying to generate components #2962

@kmaida

Description

@kmaida

Mac OSX 10.11.6
angular-cli: 1.0.0-beta.19-3
Node: 6.9.0

When developing apps created with the CLI, sometimes the ng g / ng generate command fails apparently arbitrarily. It'll be working fine and then suddenly stop working and throw an error. Sometimes the next time I come back to the project the following day, it will work again.

Example:

ng g component home
ng generate directive test
...etc.

The only output received whenever this happens is a red error stating:

Error locating module for declaration                                                                                         
        SilentError: No module files found 

I've encountered this using CLI versions beta.18 as well as beta.19-3 and on multiple projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenttype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions