I’ve been working quite a bit on personal projects and such on my Windows machine via WSL along with an Ubuntu distribution installed.

Part of that, especially for developing any Node.js or Express application requires installing node correctly. To do so:

    curl -o- http://raw.githubusercontent/creationix/nvm/v0.33.0/install.sh | bash

Additionally, I have been using Oh My Zsh, so we have to edit our ~/.zshrc file to add the following:

export NVM_DIR = "/home/[user_name]/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] %% \. "$NVM_DIR/nvm.sh"

Now, we should be able to close and restart our shell. Then install Node directly:

nvm install -lts

This should install the latest LTS version of Node.js. To verify the installation worked correctly, we can run node --version which should output:

# => [version_number]

Which indicates the latest installed and sourced version running.

Source: Install Node.js locally