From 47ac75415047fb824ebee4ed81dad44b63e4e84b Mon Sep 17 00:00:00 2001 From: Quite A Fancy Emerald <46467239+QuiteAFancyEmerald@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:44:02 +0000 Subject: [PATCH] Update repl.sh --- repl.sh | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/repl.sh b/repl.sh index 72cce097..a9d43e68 100644 --- a/repl.sh +++ b/repl.sh @@ -1,19 +1,16 @@ ##### Script for repl.it since it doesn't use the latest version of node.js ### -if [ -z "$ALREADY_SETUP" ] -then - NVM_HOME="$PWD/nvm" # Changing the installation directory - echo " NVM_HOME='$NVM_HOME' - $(wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh)" | sed -E 's/\$(HOME|\{HOME\})/$NVM_HOME/g' | bash # Installing with the specified directory - - export NVM_DIR="$NVM_HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" - - # --lts would be your desired version, i.e. 10, 12, --latest-npm. --lts is (obviously) the LTS version. - nvm install 16 - npm install - - printf 'ALREADY_SETUP=true\n\n%s\n' "$(cat repl.sh)" > repl.sh -fi + +NVM_HOME="$PWD/nvm" # Changing the installation directory +echo " NVM_HOME='$NVM_HOME' +$(wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh)" | sed -E 's/\$(HOME|\{HOME\})/$NVM_HOME/g' | bash # Installing with the specified directory + +export NVM_DIR="$NVM_HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + +# --lts would be your desired version, i.e. 10, 12, --latest-npm. --lts is (obviously) the LTS version. +nvm install 16 + +npm install node --max_old_space_size=2560 ./backend.js