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

Unable to import library from node_modules  #159

Closed
@mattem

Description

@mattem

One of our apps uses @angular/material, but due to angular/components#9502 we can't currently build this with Bazel. A newer app is attempting to use VMware's Clarity.

I get different errors when trying to reproduce this, it seems that the ng_module rule doesn't include ngfactory.js files as action inputs.

Error: Could not resolve ./clr-angular.ngfactory from /private/var/tmp/_bazel_matt/33fa3ed25498f03fdeb092569b0649b6/sandbox/darwin-sandbox/5/execroot/haystack/node_modules/@clr/angular/clr-angular.d.ts

Changing ng_module.bzl to include them allows the app to build, but causes the devserver to not be able to find the file, as I guess there is now a requirement for it to be served.
What is the right way to import libraries using the ng_module rules? The example repo shows the use of ngrx, but this doesn't have references to the ngfactory as part of the ngsummary.

Not sure if I should be opening issue against this repo or the angular one, happy to make an issue over there if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions