Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
drullo opened this issue Dec 12, 2018 · 1 comment · Fixed by #13196
Closed

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

drullo opened this issue Dec 12, 2018 · 1 comment · Fixed by #13196
Labels
area: schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken
Milestone

Comments

@drullo
Copy link

drullo commented Dec 12, 2018

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

@ngbot ngbot bot added this to the needsTriage milestone Dec 13, 2018
@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Dec 13, 2018
mgechev pushed a commit that referenced this issue Dec 14, 2018
…le is in different sub-directory

Similar to other schematics, `findModuleFromOptions` should happen prior to `parseName` that modifies the name and path.

Fixes #13182
mgechev pushed a commit that referenced this issue Dec 14, 2018
…le is in different sub-directory

Similar to other schematics, `findModuleFromOptions` should happen prior to `parseName` that modifies the name and path.

Fixes #13182
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants