-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: node-gyp: command not found (When installing testcontainers) #669
Comments
I am seeing this, too, for |
@matthewjh Yes I think the |
Same issue here on MacOS 12.5.1, M1 chip. Failing to install |
EDIT: Using It's not ideal, but we've worked around this issue on Mac temporarily by modifying the When #!/usr/bin/env sh
node_gyp_script="/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js"
if test -f "$node_gyp_script"; then
node "$node_gyp_script" "$@"
else
echo "Could not locate node-gyp. If building on Mac, install it globally by running: npm i -g node-gyp"
if [ "x$npm_config_node_gyp" = "x" ]; then
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
else
"$npm_config_node_gyp" "$@"
fi
fi A similar solution should work for Windows by modifying |
I fixed this issue by adding the following to the
Thanks to @pcj for pointing this out. |
Isn't that a workaround, not a fix, @flolu? Why close the issue? |
@matthewjh yes, you are absolutely right! |
What happened?
Repro: https://github.com/flolu/rules-js-node-gyp-error
Building this
ts_project
fails after adding the//:node_modules/testcontainers
dependency.The error is:
Version
Development (host) and target OS/architectures: Linux (Fedora)
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
How to reproduce
git clone https://github.com/flolu/rules-js-node-gyp-error cd rules-js-node-gyp-error pnpm i bazel run //:bin
Any other information?
A similar error occurs with the
sharp
package. This can be fixed by settingAPPDATA=.
inlifecycle_hooks_envs
ofnpm_translate_lock
. (See #217)The text was updated successfully, but these errors were encountered: