Generally there are many ways to use node.js with a platform, like this one for the RPi. There are a lot more similar ones if you just search for them.
Another interesting one is ArduGate, which lets web pages communicate with the arduino via JS (though probably not exactly what you wanted since it doesn't compile and load to the arduino)
Though I really don't see what's wrong with using a different language. I myself write primarily in JS, but I find myself perfectly comfortable programming an Arduino in C++ (it also allows C and Java, and if you put in a bit of work, quite a few more languages ). Remember, we're not needing anything fancy for programming a robot--just normal if
s,for
s,while
s,switch
es, and the occasional class
. Learn the syntax, and you're good to go :) The only thing is that C/C++/Java are strongly typed (though if you're using the RPi, python is weakly typed but picky in a million more ways), so you may get a bit of frustration in the beginning when you have to specify types for everything. One advantage of using the native languages is that it's much easier to find APIs and example code on the net. For example, aside from ArduGate(which has it built in and is probably not what you wanted), I can't find any way to access the EEPROM--a common task. So, unless you want to stick to simple programs, it's just better to use the native languages.
node.js
it not javascript either. It is a C library that interprets AJAX calls as mini server and is used for high volume requests- for example on ebay- You do not need to refresh a page on an item that is ending because javascript synchronises the bidding price and time by using node.js extremely quick response while reducing traffic overhead) node.js is good for arduino cause it isC
$\endgroup$c
and interface to it using node.js - which inherently uses JavaScript ajax for request but you can also use server requests or other clever code that is not related to JavaScript in anyway. $\endgroup$