Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Last active December 22, 2022 09:37
Show Gist options
  • Save micahgodbolt/8b9a338c8bab7bc147975646ea20826c to your computer and use it in GitHub Desktop.
Save micahgodbolt/8b9a338c8bab7bc147975646ea20826c to your computer and use it in GitHub Desktop.
WSL install Node

The apt-get version of node is incredibly old, and installing a new copy is a bit of a runaround.

So here's how you can use NVM to quickly get a fresh copy of Node on your new Bash on Windows install

$ touch ~/.bashrc
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
// restart bash
$ nvm install --lts

Once you've done that you'll get a nice:

$ node --version
$ v12.18.3
@firmanramdhani
Copy link

Thanks! worked for me.

@tlaughlan
Copy link

This rules. Thanks.

@aitahtman
Copy link

thanks for this 👍

@lukelovekin
Copy link

Awesome, thanks!!

@Allow-tap
Copy link

great gist :) 💯

@AkshayThakur1995
Copy link

Thankyou :)

@ChristianRich1
Copy link

After a bunch of failed attempts I ended up here. This approach totally works.

For the latest curl and installation details:
https://github.com/nvm-sh/nvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment