Skip to content

Error: Specified module does not exist #7695

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.

Activity

  1. self-assigned this
    on Sep 14, 2017
  2. added a commit that references this issue on Sep 14, 2017
    a9fea12
  3. added 2 commits that reference this issue on Sep 22, 2017
    f2a2149
    220c3fe
  4. genyklemberg commented on Dec 4, 2017

    @genyklemberg

    Same issue. Any fix?

  5. ben-wall commented on Dec 4, 2017

    @ben-wall
    Author

    I held back my version and then updating it now to the latest seemed to fix the issue

  6. added a commit that references this issue on Apr 23, 2018
    0491de1
  7. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Sep 7, 2019
  9. added a commit that references this issue on May 29, 2026
    8145214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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