Running remix Binary in Bazel sandbox #5384
Unanswered
noelenwenede
asked this question in
Q&A
Replies: 1 comment
-
Currently unable to get remix to work in the bazel sandbox. Best option right now is to disable the sandboxing as part of the build step. Two ways to do it below:
bazel build //examples/remix:build --spawn_strategy=standalone
// examples/remix/BUILD.bazel
js_run_binary(
name = "build",
srcs = srcs + npm_deps,
args = [
"build",
],
chdir = package_name(),
out_dirs = [
"build",
"public/build",
],
tags = [
"no-sandbox", // this adds flags to disable sandbox as part of the build command
],
tool = ":remix_js_binary",
) If anyone else is working on setting up remix with bazel and can fix the issue with the sandbox please let me know how you solve it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I've encountered an issue trying to use bazel as a build tool for remix. I've been able to run remix in dev mode but currently unable to get
remix build
to work.I've encountered a few errors that led up to this point. I'll list the errors in the order which they occurred with my fixes (just incase any of the fixes introduces a new issue)
@npm__browserify-zlib__0.1.4
. I assumed this was a bazel issue and tried to override browserify-zlib@0.1.4 with browserify-zlib@0.2.0, which worked. Here is bazel error for reference:install
lifecycle hook for thedeasync
npm package makes a call to thenode-gyp
binary which doesn't exist in the sandbox and thebazel build
command fails during setup. To fix this, I disabled theinstall
lifecycle hook (I also disabled it with a pnpm install outside the sandbox and theremix build
command executed perfectly) which led to the final error. Here's the error message for this error:I've tried to run it outside bazel and with pnpm (I added the override to the package.json for browserify-zlip@0.2.0, then I ran
pnpm install
with--ignore-scripts
flag) and it builds fine.I'm not sure if this is a bug with remix or a bazel issue. Has anyone else experienced this? Or does anyone having a working version of remix with bazel as the build tool?
I've created a minified version of the repository in the state of the 3rd error https://github.com/noelenwenede/bbbazel. Start up instructions are in the readme file.
Beta Was this translation helpful? Give feedback.
All reactions