Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rollup_bundle not able to resolve modules from another ng_module #218

Closed
Toxicable opened this issue Jun 4, 2018 · 4 comments
Closed

rollup_bundle not able to resolve modules from another ng_module #218

Toxicable opened this issue Jun 4, 2018 · 4 comments

Comments

@Toxicable
Copy link

Since only occurs since version 0.9.0
ng_package throws

ERROR: /home/fabian/Documents/monorepo-example/libs/lib2/BUILD.bazel:18:1: ng_package: Rollup //libs/lib2:npm_package failed (Exit 1)
[!] Error: Could not resolve import '@repo/lib1' from '/home/fabian/.cache/bazel/_bazel_fabian/225520c1efda9e4f79b739a415510a8f/execroot/monorepo_example/bazel-out/k8-fast
build/bin/libs/lib2/npm_package.es6/libs/lib2/index.js'

When trying to bundle a module with a dependency on another.
It worked fine on v0.8.0

I have a an mostly minimal reproduction here:
https://github.com/Toxicable/bazel-monorepo-example
Toxicable/bazel-monorepo-example@9e3eb44
https://github.com/Toxicable/bazel-monorepo-example/blob/master/WORKSPACE#L31
To reproduce:

  1. clone repo above
  2. adjust the WORKSPACE to use 0.9.1
  3. bazel build libs/...
  4. adjsut WORKSPACE down to 0.8
  5. bazel build libs/...
  6. notice no error
@gregmagolan
Copy link
Collaborator

gregmagolan commented Jun 4, 2018

Prior to 0.9.1, rollup would silently fail on imports that were not resolved. I added a check to rollup_bundle so that it would error out when it couldn't resolve an import (#206).

@gregmagolan
Copy link
Collaborator

@Toxicable I'll dig into this today

@Toxicable
Copy link
Author

fixed via angular/angular@a6e797b

@gregmagolan
Copy link
Collaborator

Resolved by angular/angular#24298 (angular/angular@a6e797b)

alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this issue Oct 17, 2020
alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this issue Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants