I'm on LXLE. I ran "sudo apt-get install node" And then made a helloworld.js file which contains "console.log("hello world"); then I ran "node helloworld.js" but nothing happened. I thought the hello world program would be that simple. Am I missing something?
Originally Posted by tumelo I ran "sudo apt-get install node" Really? The package for node.js is called "nodejs". There is a package called "node" but that is an entirely different thing.
I figured it out. Apparently the package is called nodejs, not node. So you have to run "sudo apt-get install nodejs" and then run the program with "nodejs helloworld.js" instead of "node helloworld.js"
Sorry didn't read your response until after I figured it out and posted, but Thanks spjackson
Last edited by tumelo; December 8th, 2015 at 07:30 PM.
View Tag Cloud
Ubuntu Forums Code of Conduct