-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
nodeenv falls back to /usr/bin/nodejs instead of the node installed by actions/setup-node #905
Comments
Than you for creating the issue, we will investigate the source of it and update you on the details! |
Hello @godlygeek, Thank you for the issue once again. We have investigated on the issue and found that the tool is just checking for the name 'node' from the current implementation of actions/setup-node, that is why nodeenv is falling back. Please find the screenshot for reference. |
I'm not very familiar with Node, but it sounds like a good idea to me to include both |
Hello @godlygeek, Thank you for the feature request to consider both node and nodejs to be consider for both executables. This feature request will be considered in the next quarters based on the prioritization. |
Hello @godlygeek, just a gentle ping. |
Sorry, I'm not sure what you're waiting on me for. I'm not sure what you meant by
Can you clarify what you're suggesting here? For now, the workaround I've done is this. Note that I'm not directly installing nodeenv and can't update it - it's being installed behind the scenes by https://github.com/pre-commit/pre-commit |
Hello @godlygeek! I apologize for the confusion. I just wanted to check with you that the workaround to use node instead of nodejs. |
Description:
In a
runs-on: ubuntu-latest
GitHub hosted runner, I found that even after doing:that
pre-commit run -a
was failing to run a pre-commit hook configured as:with an error saying:
Which was surprising, seeing as how we had just installed node version 16.
It turns out that
pre-commit
runsnodeenv
, andnodeenv
looks first for a binary namednodejs
, and then falls back to looking for one namednode
:https://github.com/ekalinin/nodeenv/blob/eaa9de97e561ab4f99458c94633e92547e72d5f1/nodeenv.py#L931-L938
And it seems like
actions/setup-node
is only installing one namednode
, and not one namednodejs
, sonodeenv
found /usr/bin/nodejs first and preferred that over /opt/hostedtoolcache/node/16.20.2/x64/bin/node.Should the hostedtoolcache contain a
nodejs
as well? Or perhapsnodeenv
should prefernode
overnodejs
?Action version:
actions/setup-node@v4
Platform:
Runner type:
Tools version:
Repro steps:
See https://github.com/bloomberg/memray/actions/runs/6984525297/job/19007471664 for a failed run where /usr/bin/nodejs was chosen instead of /opt/hostedtoolcache/node/16.20.2/x64/bin/node
The text was updated successfully, but these errors were encountered: