Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Repro of Angular Material Bazel compilation issue #63

Closed
wants to merge 1 commit into from

Conversation

pshields
Copy link

Angular Material 5.1.0 (and 5.0.x) currently encounters compilation errors when consumed from an Angular/Bazel app. Here is an example repro which fails to build. The failure shows up when running bazel build //src.

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

I've confirmed that node_modules/@angular/material/button/typings/index.ngfactory.js is present in the workspace, so I'm not sure why the import can't be resolved.

Though this repro uses MatButtonModule, I think almost any Angular Material NgModule will similarly fail; MatButtonModule was chosen arbitrarily.

@adamyi
Copy link

adamyi commented Jan 29, 2018

It appears that index.ngfactory.js is not present in Bazel's sandbox dir (though present in node_modules) in my case.

However, it's strange that even if I add *.js to node_modules rule in the root BUILD.bazel, that file still doesn't appear in Bazel's sandbox. I don't know it's due to something else since I'm not very familiar with Bazel's typescript and nodejs rules

@adamyi
Copy link

adamyi commented Jan 29, 2018

I fixed this as mentioned in the issue.

@alexeagle
Copy link
Contributor

Thanks @adamyi
I agree with @jelbourn - we are close to building Material with Bazel so it should just be a bazel dep, then we can skip a lot of hassle with importing the npm distribution.

Nothing more to do here, I think?

@alexeagle alexeagle closed this Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants