Last active
March 26, 2022 09:58
-
-
Save Dadangdut33/29cbe34030cf1129266a4225ac215429 to your computer and use it in GitHub Desktop.
Use latest node version in replit.
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
# Method 1 | |
# Source https://replit.com/talk/ask/change-node-version/5924 | |
export NVM_DIR="$HOME/.nvm" && | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && | |
nvm install --lts && | |
nvm use --lts | |
# Method 2 | |
# Source https://replit.com/@vuhuy09/Nodejs-16#README.md | |
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment