-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
nvm command not found using github actions, works in shell #2847
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
Comments
I use nvm in over 300 projects via https://github.com/ljharb/actions/tree/main/node/install - an example is https://github.com/ljharb/qs/blob/e9877e3b6e23907086403dfb7e39dab0fefb86d7/.github/workflows/node-4%2B.yml It may be because every docker command runs in a fresh shell, so you have to source nvm.sh inside every RUN. |
I had a similar problem - answered here: https://askubuntu.com/a/1041348/521202 Ubuntu's default |
What did you do concretly ? |
If I remember correctly, I looked for the below code in .bashrc and removed it: # If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac |
Thanks for answering. Here's actually what I did after which is perhaps simpler : adding
in the github actiion file. It comes from here : appleboy/ssh-action#21 (comment) |
This has worked for me. Thanks a bunch. |
Operating system and version:
Debian GNU/Linux 11 (bullseye)
nvm debug
output:nvm ls
output:How did you install
nvm
?sh install script.
Issue
Running nvm use or any nvm command using GitHub actions in container (appleboy/ssh-action) returns: err:
nvm: command not found
If I however ran this in shell normally it is functional. I suspect this is an issue with the way nvm is being installed on the machine, and not being accessible by docker?
Is there anything in any of your profile files that modifies the
PATH
?No
The text was updated successfully, but these errors were encountered: