wsl install latest npm code example
Example 1: install wsl
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Example 2: install npm in wsl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
echo 'export NVM_DIR="/home/yourusername/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' > ~/.bashrc
source ~/.nvm/nvm.sh
#Reset bash and finally install node
nvm install node