Components: '@angular/material/index.d.ts' is not a module

Created on 25 Oct 2019  路  2Comments  路  Source: angular/components

馃悶 bug report

Affected Package


The issue is caused by package @angular/material

Is this a regression?


Yes, it was previously working.

Description


When installing @angular/material@next the main definition files is empty and TypeScript complains that @angular/material is not a module.
node_modules/@angular/material/index.d.ts does not contain any code part from a comment.

馃敩 Minimal Reproduction



https://github.com/JonWallsten/monorepo-repro/tree/angular-material-issue
Install and run according to the Readme.md.

馃敟 Exception or Error

ERROR in packages\web-app-angular\node_modules\web-lib-angular\src\material-design.module.ts(33,8): 
 error TS2306: File 'C:/Users/me/repo/monorepo-repro/node_modules/@angular/material/index.d.ts' is not a module.
packages\web-lib-angular\src\material-design.module.ts(33,8): 
 error TS2306: File 'C:/Users/me/repo/monorepo-repro/node_modules/@angular/material/index.d.ts' is not a module.

馃實 Your Environment

Angular Version:



Angular CLI: 9.0.0-next.15
Node: 10.16.3
OS: win32 x64
Angular: 9.0.0-next.13
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-next.15
@angular-devkit/build-optimizer   0.900.0-next.15
@angular-devkit/core              9.0.0-next.15 (cli-only)
@angular-devkit/schematics        9.0.0-next.15
@angular/cdk                      9.0.0-next.0
@angular/cli                      9.0.0-next.15
@angular/http                     8.0.0-beta.10
@angular/material                 9.0.0-next.0
@ngtools/webpack                  9.0.0-next.15
@schematics/angular               9.0.0-next.15
@schematics/update                0.900.0-next.15
rxjs                              6.5.3
typescript                        3.5.3

Most helpful comment

From changelog:

material

Breaking changes:

Components can no longer be imported through "@angular/material". Use the individual secondary entry-points, such as @angular/material/button.

All 2 comments

From changelog:

material

Breaking changes:

Components can no longer be imported through "@angular/material". Use the individual secondary entry-points, such as @angular/material/button.

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._

Was this page helpful?
0 / 5 - 0 ratings