Skip to content

Cannot create pipe in sub-directory if module is in different sub-directory #13182

Closed
@drullo

Description

@drullo

Bug Report or Feature Request (mark with an x)

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

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Node: 8.11.3
NPM: 6.4.1
Angular CLI: 7.1.2
Windows 10

Repro steps

  1. Move app.module.ts to a subdirectory called "modules"
  2. Observe failure from ng g p pipes/test-pipe -m modules/app
  3. In contrast, observe that ng g c components/test-component -m modules/app does succeed

The log given by the failure

Specified module 'modules/app' does not exist.
Looked in the following directories:
    /src/app/pipes/modules/app
    /src/app/pipes/test-pipe
    /src/app/pipes/modules
    /src/app/pipes
    /src/app
    /src

Desired functionality

The expectation is that this would successfully create the pipe in the pipes subdirectory (creating it if necessary) and import it into modules/app.module.ts. This functionality does work when creating components or services in a subdirectory, just not pipes.

Mention any other details that might be useful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions