Skip to content

Compilation issues when using Angular Material 5.0.x/5.1.0 in an Angular/Bazel app #9502

Closed
@pshields

Description

@pshields

Angular Material 5.1.0 (and 5.0.x) currently encounters compilation errors when consumed from an Angular/Bazel app.

An example error is Could not resolve ./index.ngfactory from [....]/angular_bazel_example/node_modules/@angular/material/button/typings/index.d.ts.

To reproduce, run bazel build //src from angular/angular-bazel-example#63 (small repro PR.)

I've confirmed that node_modules/@angular/material/button/typings/index.ngfactory.js is present, so I'm not sure why the import can't be resolved. The error is occurring in TsCompilerAotCompilerTypeCheckHostAdapter.fromSummaryFileName, which is defined in https://github.com/angular/angular/blob/5.2.x/packages/compiler-cli/src/transformers/compiler_host.ts. One guess I had is that the summary loader may be looking for a .ts file instead of a .js file, but I couldn't tell from looking at that file whether or not that is the case.

/cc @alexeagle @jelbourn

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions