-
Notifications
You must be signed in to change notification settings - Fork 12k
angular-devkit/schematics: Tree.read() returns null when tsconfig.json contains path mappings #20118
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
Comments
I got the same error. |
These reproduction steps didn't work for me in a "paths": {
"@lib/*": ["hacks/private-libs/*"],
"@app/*": ["src/app/*"],
"@env/*": ["src/environments/*"],
"@config/*": ["src/app/config/*"],
"@shared/*": ["src/app/shared/*"]
} However, this issue is reproducible: $ ng add @angular/material
ℹ Using package manager: npm
✔ Found compatible package version: @angular/material@11.2.1.
✔ Package information loaded.
✔ Package successfully installed.
? Choose a prebuilt theme name, or "custom" for a custom theme: Indigo/Pink [ Preview: https://material.angular.io?theme=indigo-pink ]
? Set up global Angular Material typography styles? Yes
? Set up browser animations for Angular Material? Yes
UPDATE package.json (1264 bytes)
✔ Packages installed successfully.
Could not read Angular module file: /src/@app/app.module.ts |
The issue here is that we call I don't see an open issue for this in the angular-cli repo, so I'm going to transfer this one over. |
Duplicate of #12740 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I getvthe following error in my application (with about 10 modules). To isolate the root cause I created a minimal angular app that shows the effect.
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue
Steps to reproduce:
ng new test-app --defaults=true --routing=false --style=scss
paths
totsconfig.json
main.ts
to use paths defined intsconfig.json
ng add @angular/material
Expected Behavior
ng add @angular/material
resolves import paths usingpaths
definition in tsconfig.jsonActual Behavior
error:
Environment
The text was updated successfully, but these errors were encountered: