Skip to content

Error: Specified module does not exist #7695

@ben-wall

Description

@ben-wall

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting - [ ] feature request 

Versions.

@angular/cli: 1.4.2
node: 8.2.1
os: linux x64
@angular/animations: 4.3.6
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.4.2
@angular/compiler-cli: 4.3.6
@angular/language-service: 4.3.6
typescript: 2.3.4

Repro steps.

15:38 $ ng new test-project 15:38 $ cd test-project 15:38 $ ng g m modules/admin create src/app/modules/admin/admin.module.spec.ts (267 bytes) create src/app/modules/admin/admin.module.ts (189 bytes) 15:38 $ ng g c components/cookie -m modules/admin Error: Specified module does not exist Specified module does not exist 15:38 $ ng g c components/cookie -m modules/admin/admin.module.ts Error: Specified module does not exist Specified module does not exist 15:39 $ ng g c components/cookie -m src/app/modules/admin/admin.module.ts Error: Specified module does not exist Specified module does not exist 

As you can see I am trying to add a component to a module instead of the default app.module.ts, but since a recent update it doesn't seem to let me, any more.
ng g c components/cookie -m modules/admin // this used to work :(

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions