change node version
Can I change the node version of a repl?
You cannot modify a language's version on repl.it if it does not have a separate language for the version (e.g. Python 3&2).
@ash15khng repl.it seems to be running different versions of node for different environments. As of writing..
NodeJS -> v10.16.0
TypeScript + NodeJS -> v9.11.2
It would be good to be able to set the NodeJS runtime, or perhaps use the current LTS for all node runtimes. repl.it is a pretty good way to communicate repros for developers tho, it would be better to able to select the appropriate runtime if possible.
Actually, you can change the node version. Here I'm going to use nvm. My script for installing it and setting it up is right here:
This will install the lts version, but you can change that to be a different version (using
nvm install 14.15.4 if you want 14.15.4, and then running
nvm use 14.15.4 to use the 14.15.4 version). By the way, this is assuming the code is contained in use_nvm.sh (so the echo at the end is correct). To run the code (again assuming it is stored in use_nvm.sh), just run
Note: You must run this every time you reopen the repo.
By the way, you can also go to my repo here https://repl.it/@CrazyVideoGamez/Update-Node-Script#update_node.sh, and fork it.