Skip to content

Instantly share code, notes, and snippets.

@ludndev
Created March 8, 2024 17:16
Show Gist options
  • Save ludndev/ba784fadbb9e1164145913e0355c5371 to your computer and use it in GitHub Desktop.
Save ludndev/ba784fadbb9e1164145913e0355c5371 to your computer and use it in GitHub Desktop.

Unable to found npm from your script file during CI/CD cycle ? Add this before using npm.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment