On the official NodeJS website I downloaded the recommended windows installer. I tried on Ubuntu to see my version, node -v, and it doesn't work. When I type anything with node it says:
command 'node' not found, but can be installed with:
sudo apt install nodejs
I tried sudo apt install nodejs and I got another error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nodejs
Trying npm is not any better
: not foundram Files/nodejs/npm: 3:
: not foundram Files/nodejs/npm: 5:
/mnt/c/Program Files/nodejs/npm: 6: Syntax error: word unexpected (expecting "in")
However, when I search node on the windows task bar, there is a node app that is listed and it opens a terminal. I'm new to Linux and it's my first time using Ubuntu, and I'm on windows 10, please advise me on what to do. Thanks.
question from:
https://stackoverflow.com/questions/65865421/i-downloaded-nodejs-from-the-official-website-but-it-doesnt-work-ubuntu 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…