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
When running builds in Gitlab with local caches, the cached directories must exist within the workspace folder. Because of this, every Bazel command must be run with the bazel --output_base=some-dir option (or put a line in the .bazelrc file with startup --output_base=some-dir)
However, that flag breaks some binaries, for instance, Vuepress if the generated binary is used:
When running with the --output_base option, it fails with an error message like this one:
INFO: Found 1 target...
ERROR: /workspace/bazel_rulesjs_output_base_reprod/app/BUILD.bazel:3:20: Vitepress app/.vitepress/dist failed: (Exit 1): app__js_binary.sh failed: error executing command (from target //app:app) bazel-out/k8-opt-exec-2B5CBBC6/bin/app/app__js_binary.sh build
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
build error:
Error: ENOENT: no such file or directory, mkdir '/workspace/bazel_rulesjs_output_base_reprod/node_modules'
at Object.mkdirSync (node:fs:1382:3)
at makeDir$1.makeDirSync (file:///workspace/bazel_rulesjs_output_base_reprod/buildcache/execroot/__main__/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/[email protected]/node_modules/vitepress/dist/node/serve-80cecaf0.js:8871:15)
at Object.createSymlinkSync$1 (file:///workspace/bazel_rulesjs_output_base_reprod/buildcache/execroot/__main__/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/[email protected]/node_modules/vitepress/dist/node/serve-80cecaf0.js:9869:3)
at linkVue (file:///workspace/bazel_rulesjs_output_base_reprod/buildcache/execroot/__main__/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/[email protected]/node_modules/vitepress/dist/node/serve-80cecaf0.js:41881:12)
at build (file:///workspace/bazel_rulesjs_output_base_reprod/buildcache/execroot/__main__/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/[email protected]/node_modules/vitepress/dist/node/serve-80cecaf0.js:41810:21) {
errno: -2,
syscall: 'mkdir',
code: 'ENOENT',
path: '/workspace/bazel_rulesjs_output_base_reprod/node_modules'
}
Version
Development (host) and target OS/architectures:
Official bazel Docker image + fresh linux insalls where pnpm has never been run
Output of bazel --version:
bazel 6.0.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
1.15.0 (also happened on 1.14.0)
Language(s) and/or frameworks involved:
Vitepress
How to reproduce
I created a simple reproduction example with a one-click button to run in Gitpod.
https://github.com/rdfirtal/bazel_rulesjs_output_base_reprod
Any other information?
No response
Fund our work
Sponsor our open source work by donating a bug bounty
The text was updated successfully, but these errors were encountered:
What happened?
When running builds in Gitlab with local caches, the cached directories must exist within the workspace folder. Because of this, every Bazel command must be run with the
bazel --output_base=some-dir
option (or put a line in the .bazelrc file withstartup --output_base=some-dir
)However, that flag breaks some binaries, for instance, Vuepress if the generated binary is used:
When running with the --output_base option, it fails with an error message like this one:
Version
Development (host) and target OS/architectures:
Official bazel Docker image + fresh linux insalls where pnpm has never been run
Output of
bazel --version
:bazel 6.0.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:1.15.0 (also happened on 1.14.0)
Language(s) and/or frameworks involved:
Vitepress
How to reproduce
I created a simple reproduction example with a one-click button to run in Gitpod. https://github.com/rdfirtal/bazel_rulesjs_output_base_reprod
Any other information?
No response
Fund our work
The text was updated successfully, but these errors were encountered: