Skip to content

'@angular/material/index.d.ts' is not a module #17503

@JonWallsten

Description

@JonWallsten

🐞 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions