I agree, this is a bit of an issue but I don't know why it's happening.
The Fix
First things first, just create a symbolic link from called node
pointing to the nodejs
binary.
ln -s /usr/bin/nodejs /usr/bin/node
The Problem
Quite a few guides I found for installing Nodejs (here and here) all have similar code to test whether the installation happened correctly. So essentially create a simple server like so:
// hello_node.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Node.js\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');
and then run it in nodejs with the following:
node hello_node.js
And then when I was trying to use npm to install something, it was failing and reporting the same node not found
message.
nodejs
is in the PATH, butnode
andnpm
aren't available, I can't find them anywhere on my system.node
binary was renamed was because it conflicted with one of the packages callednode
(Amateur Packet Radio Node Program).node
and notnodejs
?node
is not what you think it is.node
is used in every tutorial I've seen