Last active
March 25, 2022 22:13
-
-
Save xtfer/23cb478906370d68f5acbee6b11a2d3a to your computer and use it in GitHub Desktop.
Install nvm on Platform.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Statements in this file will be executed (sourced) by the shell in SSH | |
# sessions, in deploy hooks, in cron jobs, and in the application's runtime | |
# environment. | |
# This loads nvm for general usage. | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The hooks executed at various points in the lifecycle of the application. | |
hooks: | |
# The deploy hook runs after your application has been deployed and started. | |
build: | | |
unset NPM_CONFIG_PREFIX | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | dash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
nvm current | |
nvm install 9.5.0 | |
deploy: | | |
unset NPM_CONFIG_PREFIX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should probably ignore this and use what's at https://docs.platform.sh/languages/nodejs/node-version.html. This should work, but it was created before Platform.sh had better node version management.