With WSL I installed these from NodeSource because they maintain a repository of the latest version of Node.js.
To install Node.js and npm follow these steps.
Enable the repository by running this curl command as a user with sudo permissions. If you don’t run the command with sudo.
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
Once that is enabled you can install Node.js and npm by entering
sudo apt install nodejs
You can verify if you have them by entering the following.
sudo npm --version