-
-
Notifications
You must be signed in to change notification settings - Fork 577
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
Server has NodeJS 16 active, but node -v returns version 12 from the github action. #277
Comments
I am also facing same issue but my node.js version is coming v16.13.2 although I have v20 active on my VPS Update: I fixed this issue by doing this: script: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# your script here Basically, it just make sures that v20 is active on your VPS. For some reasons, it doesn't get maintained. |
Thanks a lot, it worked like charm! |
Or you could also add the same script to the For global configuration (applies to all users), the file is
|
Thanks |
See the same solution #21 (comment) |
Hi,
I've setup deploy automation for my newly created server. I initially installed node using
sudo apt install nodejs
, which installed the node version of 12.Then I installed nvm and switched to node version 16.
Now, whenever I run
yarn install
ornode -v
from my SSH terminal. It works fine and returnv16.20.2
But
yarn install
command from the github action returns the following outputFor testing purpose, I added the
node -v
command in the action YML file, I got the following outputThe text was updated successfully, but these errors were encountered: