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
{{ message }}
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
I've cloned this repo and I added node_repositories to the list of loaded functions from @build_bazel_rules_nodejs//:defs.bzl so I could use vendored_node and vendored_yarn options. That's the only thing I've changed here and I get this error when trying to run the devserver.
no such target '@angular_bazel_example//:nodejs/node.exe':
target 'nodejs/node.exe' not declared in package '';
however, a source file of this name exists.
(Perhaps add 'exports_files(["nodejs/node.exe"])' to /BUILD?)
I've confirmed that the folder structure is sound. I have nodejs with what is essentially a copy/paste from Program Files, same with yarn. Bazel run @nodejs//:yarn works fine.
Taking a look at server artifacts, I can see [hash]/external/angular_bazel_example/nodejs/node.exe is available.
The text was updated successfully, but these errors were encountered:
ncgreco1440
changed the title
Cannot find nodejs
Cannot find nodejs when running bazel run //src:devserver
Jul 9, 2019
I think what the error message suggests is right. If you've vendored node.exe into your repo, you still need to expose it to be referenced from outside the Bazel package where it lives. That's what the exports_files does.
I've cloned this repo and I added node_repositories to the list of loaded functions from @build_bazel_rules_nodejs//:defs.bzl so I could use vendored_node and vendored_yarn options. That's the only thing I've changed here and I get this error when trying to run the devserver.
Here what my node_repositories call looks like.
I've confirmed that the folder structure is sound. I have nodejs with what is essentially a copy/paste from Program Files, same with yarn. Bazel run @nodejs//:yarn works fine.
Taking a look at server artifacts, I can see [hash]/external/angular_bazel_example/nodejs/node.exe is available.
The text was updated successfully, but these errors were encountered: