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

ng-add expects path relative to /src/app #2291

Closed
darvids0n opened this issue May 31, 2020 · 1 comment · Fixed by #2292
Closed

ng-add expects path relative to /src/app #2291

darvids0n opened this issue May 31, 2020 · 1 comment · Fixed by #2292
Labels

Comments

@darvids0n
Copy link

darvids0n commented May 31, 2020

Description
When running ng add @ngx-formly/schematics, the installation fails if the root app module is not in the default folder, even if you provide the --module option. You need to provide a relative path to /src/app, which may not even exist (eg in my case), for it to function.

Minimal Reproduction

ng new formly-schematic-test --minimal -g --routing=false --style=scss
cd formly-schematic-test; mv src/app src/root
# Edit src/main.ts to include AppModule from the proper path.
ng add @ngx-formly/schematics --module="root/app.module.ts"

Expected result

The schematic will find the specified module by searching from project.sourceRoot, or using the working directory plus the relative path provided, and successfully configure the project.

Actual result

The schematic fails with Specified module does not exist.
Installation succeeds if --module="../root/app.module.ts" is provided.

Your Environment

  • Angular version: 9.1.9
  • Formly version: 5.6.2
@aitboudad
Copy link
Member

This issue has been fixed and released as part of v5.7 release.

Please let us know, in case you are still encountering a similar issue/problem.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants