-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
17
Description
@IliaPodolko
I hope its fine that I just copy the issue.
This is a intentional duplicate!
Installation of angular/material v18 breaks IntelliSense/Suggestions for some types from node_modules in VSCode. I tried the same repo steps using angular v17 and everything works fine.
Important
Angular language Service is up to date.
After including ""typeRoots": ["node_modules/@angular/material"]" in tsconfig under "compilerOptions" it works again, BUT you get an error in tsconfig:
Cannot find type definition file for 'esm2022'.
The file is in the program because:
Entry point for implicit type library 'esm2022'ts
Cannot find type definition file for 'fesm2022'.
The file is in the program because:
Entry point for implicit type library 'fesm2022'ts
Cannot find type definition file for 'prebuilt-themes'.
The file is in the program because:
Entry point for implicit type library 'prebuilt-themes'ts
Cannot find type definition file for 'schematics'.
The file is in the program because:
Entry point for implicit type library 'schematics'ts
angular/components#29537 (comment)
Is also not the solution. Its only a workaround. Intellisense should, like with the import in typeRoots, find the Module and import it on its own.
Reproduction
Repo with this error https://github.com/IliaPodolko/vscode-imports
Steps to reproduce:
- Create new angular app
ng new my-angular-project - Install material
npm install @angular/material - Go to app.component.ts and try add FormsModule, you will NOT see suggestions
Expected Behavior
User should see suggestions in VSCode
Actual Behavior
User does not see suggestions in VSCode when using angular v18 with angular/material
Environment
- Angular: 18.2.4 (CLI)
- CDK/Material: 18.2.4
- Browser(s): Chrome
- Operating System: Windows 11 64bit
- Node: 22.6.0