I am trying to make node work inside Bash on Ubuntu on Windows.
I am just starting out with using Bash on Ubuntu on Windows, so I am probably doing some newbie mistake.
I have done apt-get install
on node
# sudo apt-get install node
Reading package lists... Done
[...]
That command gives reasonable output.
But when I actually try to run the command I get no response whatsoever. No error message, nothing
# node -v
# node
#
What am I doing wrong?
Enable the new Bash on Ubuntu on Windows 1 – Right click on the Start icon and select Programs and Features. 2 – Click Turn Windows features on or off. 3 – Scroll down to the new Windows subsystem for Linux and tick it, click OK. 4 – Wait for it to apply and reboot when prompted.
Make sure the node path is added, if not added it. After doing this restart Visual Studio or open a fresh command prompt. From the command prompt type 'node -v' to echo the node version installed. You can also add the path to node or any other application directly on the command line.
The error “npm is not recognized as an internal or external command” error may occur because either the npm is not installed or it is not added to the windows path. To resolve this error, the first solution is to install Node. js on Windows as Node. js is equipped with npm by default.
Configure a WSL-based Node.You can set a Node. js installation as the default interpreter for the current project or you can configure and use this Node. js version in a Node. js Run/Debug configuration.
To install NodeJS in ubuntu, install nodejs
package:
wget -qO- https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install nodejs
The package node
is not related to NodeJS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With