What happened?
Upgraded to Node 20.11.1 and running a js_binary target started erroring with ERR_MODULE_NOT_FOUND for libraries the which were transitively depended upon via an included js_library. We expected transitive dependencies to be appropriately forwarded to the binary.
Upon investigation, this worked in Node 19.7 and started failing in Node 19.8.
Version
Development (host) and target OS/architectures:
MacOS Sonoma 14.3.1 on an M1 machine
Output of bazel --version:
6.0.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
aspect-build/bazel-lib: 2.4.2
aspect-build/rules_js: 1.37.1
Language(s) and/or frameworks involved:
Node 19.8+
How to reproduce
You can reproduce by using https://github.com/vpanta/node_20_deps_issue and setting the Node version in the WORKSPACE to 19.8 or later.
Any other information?
Conversation in Bazel's Slack: https://bazelbuild.slack.com/archives/CEZUUKQ6P/p1708720525262059
Seems to be related to nodejs/node#45258 addition of new fs APIs
What happened?
Upgraded to Node
20.11.1and running ajs_binarytarget started erroring withERR_MODULE_NOT_FOUNDfor libraries the which were transitively depended upon via an includedjs_library. We expected transitive dependencies to be appropriately forwarded to the binary.Upon investigation, this worked in Node
19.7and started failing in Node19.8.Version
Development (host) and target OS/architectures:
MacOS Sonoma 14.3.1 on an M1 machine
Output of
bazel --version:6.0.0Version of the Aspect rules, or other relevant rules from your
WORKSPACEorMODULE.bazelfile:aspect-build/bazel-lib:
2.4.2aspect-build/rules_js:
1.37.1Language(s) and/or frameworks involved:
Node
19.8+How to reproduce
You can reproduce by using https://github.com/vpanta/node_20_deps_issue and setting the Node version in the
WORKSPACEto19.8or later.Any other information?
Conversation in Bazel's Slack: https://bazelbuild.slack.com/archives/CEZUUKQ6P/p1708720525262059
Seems to be related to nodejs/node#45258 addition of new
fsAPIs