You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into pretty much the exact same issue, albeit I'm using js_grpc_web_library. I'm still underway moving our existing project from rules_nodejs to rules_js (so I don't fully understand what solutions or methods might exist). However, it seems like the main problem is simply that node_modules is a target of the workspace now (i.e. //:node_modules), whereas before it was an external repository (i.e. @npm//grpc-web).
setting deps_repo to an empty string, at least seems to point it in the workspace, but I suspect there are other issues that haven't been uncovered. For example, even if I could point to the correct target path ( i.e. //:node_modules). Is it still going to try to package it into node_modules using the js_library rule which comes from rules_nodejs (which I don't have anymore)?
I think the main issue is just that rules_js isn't like rules_nodejs, so it's just fundamentally broken compatibility. Hopefully it's an easy patch-file fix, but I would guess there isn't an existing work around.
Kinda surprised to see only one issue about this, but maybe many people are still holding off on upgrading out of rules_nodejs, or the universe of js and grpc and bazel people is pretty small.
Description
Hi, I'm using
js_grpc_node_library
, and I'm trying to use thedeps_repo=
parameter to point to a custom named repo.I'm using
rules_js
, myWORKSPACE
looks like this.and then my
BUILD
file looks like this:Adding
deps_repo="@custom_npm"
doesn't work because the dep is looked up at@custom_npm//@grpc/grpc-js
which I believe is correct when using the old and now unmaintainedrules_nodejs
, but when using the newerrules_js
the dep is placed instead at@custom_npm//:node_modules/@grpc/grpc-js
(per docs https://docs-legacy.aspect.build/aspect-build/rules_js/v1.6.4/docs/npm_import-docgen.html#npm_translate_lock-link_workspace). Is there a way to make this work?I looked at the code a bit, and there's a string replacement taking place
rules_proto_grpc/js/js_grpc_node_library.bzl
Line 22 in bbb8193
The text was updated successfully, but these errors were encountered: