The issue is caused by the rule: nodejs_binary
No
Failed to build nodejs_binary on Windows when using linux_amd64 target.
It looks like nodejs_binary_macro is trying to run @nodejs_linux_amd64//:bin/nodejs/node.exe
Use this repo to reproduce:
cd %TEMP%
git clone [email protected]:scalio/bazel-nestjs-starter.git
cd bazel-nestjs-starter
git checkout 92f3ffe573136776d71a1bc42630fe5c1b4700bb
bazel build --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 //src:docker
or
bazel build --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 //src:server
## 馃敟 Exception or Error
INFO: Analyzed target //src:docker (656 packages loaded, 19072 targets configured).
INFO: Found 1 target...
ERROR: missing input file '@nodejs_linux_amd64//:bin/nodejs/node.exe'
ERROR: C:/users/root/appdata/local/temp/bazel-nestjs-starter/src/BUILD.bazel:37:1: //src:docker: missing input file '@nodejs_linux_amd64//:bin/nodejs/node.exe'
Target //src:docker failed to build
ERROR: C:/users/root/appdata/local/temp/bazel-nestjs-starter/src/BUILD.bazel:37:1 1 input file(s) do not exist
INFO: Elapsed time: 560.307s, Critical Path: 0.21s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
## 馃實 Your Environment
**Operating System:**
Windows 10 Pro version 1903 (build 18362.207)
Output of bazel version:
0.27.0
Rules version (SHA):
0.33.0 (937b9f3dd2cc95941d9989e1292656c57912f096a1541d7dc17683622501fe11)
/cc @Globegitter
Thanks for the clean repro. I have a fix and will post a PR shortly.
Most helpful comment
Thanks for the clean repro. I have a fix and will post a PR shortly.