Open ghost opened 1 year ago
Met same issue here. Wondering did you figure it out @giofunchal in the end?
No, I have no workaround to offer unfortunately @pcpLiu
From what I can tell, it doesn't seem like this is a bug in rules_js - have you tried filing it on rules-proto-grpc ?
I'm using rules_js, my
WORKSPACE
declares a custom name for the npm repo:I'm also using https://github.com/rules-proto-grpc/rules_proto_grpc , 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).In
rules_proto_grpc
there's a string replacement taking place https://github.com/rules-proto-grpc/rules_proto_grpc/blob/bbb81931a510290127471b25d31b97e8211fa401/js/js_grpc_node_library.bzl#L22 that doesn't seem ameanable to working with the wayrules_js
declares the npm dependencies when using a custom repo name, unless there is some other trick I am missing, is there a way to make this work?