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.34.0/install.sh | bash
// restart bash
$ nvm install node
Then on macOS you should do:
touch ~/.bash_profile
and add this source ~/.bashrc
to your .bash_profile file
Once you've done that you'll get a nice:
$ node --version
$ v7.4.0
Note: Ubuntu 17.04 comes with cmdtest installed by default. If you’re getting errors from installing yarn, you may want to run
sudo apt remove cmdtest
On Debian or Ubuntu Linux, you can install Yarn via our Debian package repository. You will first need to configure the repository:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Then, to install yarn after nvm run:
sudo apt-get update && sudo apt-get install --no-install-recommends yarn