The package contains only the node binary and the required .so libraries. Copy them to your sd-card or usb stick and link node in /usr/bin and the .so in /usr/lib.
If you like to know how to build it yourself please check the tutorial on my blog:
If you need additional modules (as you probably will) you should build the binaries following the tutorial and also follow the instructions at the end, since you will need to build the modules on your host system and then transfer them to the YUN.
I've experienced that too. It seems like npm is using a lot of memory for doing a simple install. Fortunately, node and express work well once installed.
The easiest way is probably to install express on your computer and then copy the node_modules folder on your yun.
Otherwise you can set up a temporary swap file, just for setting it up
I have a Yun with latest image, a 16 GB SD Card formatted using the YunDiskSpaceExpander sketch and followed the instructions for installing node using opkg.
I tried both with or without a 512 MB swap on SDCard, installing express or johnny-five from a fresh boot results in the same "FATAL ERROR: Evacuation Allocation failed - process out of memory" message =(
There is still much room for improvement on the nodejs side @Squonk42, try this one
Access the yun via ssh or putty (do NOT use the IDE Serial Monitor)
Enter
Exactly: IDE serial monitor is a not a fully fledged Terminal. Linux terminals use control characters that you cannot send with IDE Serial Monitor. For example, you could not use the arrow keys to move to the desired text
The express installation looks it is OK, it look like it is installed in "/node/usr/lib/node_modules/express", but I cant't find the "express" command line script, and it is not in the PATH either.
Surely the Yun is not the best development environment almost for everything else than small scripts.
As for Node.js, I would stick with a "development on my pc, production on the yun" approach, just like you would do if you were to put some website on the public internet.
I would avoid everything that needs some additional computation before being used. Jade for example needs to compile its templates at the first request and once compiled they go to memory. Try using another template engine that allows you to compile templates "offline" (I used dust.js in the past). Also avoid running coffeescript on the server side: precompile it to javascript (don't get me wrong: I'm a big fan of coffeescript)
One more thing. As you know nodejs is single threaded. In your example, that means that it's either giving you back the glaphicons or it's answering some "hello world" request. Uglify and pack all the assets in few files (ideally: one js and one css)
I'm using express (with body-parser sub-module) for rest request,
ejs as renderer,
sqlite3 as db and dblite ( GitHub - WebReflection/dblite: sqlite for node.js without gyp problems ) as node module for controlling it
then my setup is like your: bootstrap and jquery used in the front end for layout, glyph icons and ajax.
@mantissa00: I have a 16 GB class 4 SD card with only 3% used, so this is not the problem.
The problem is more with CPU performance and RAM usage:
root@Arduino:~/node/foo# ./bin/www
GET /contact 304 16238ms
GET /stylesheets/bootstrap.min.css 304 151ms
GET /javascripts/jquery-1.11.1.min.js 304 134ms
GET /stylesheets/style.css 304 135ms
GET /javascripts/bootstrap.min.js 304 131ms
POST /thanks 200 2873ms - 1.21kb
GET /stylesheets/bootstrap.min.css 304 63ms
GET /javascripts/jquery-1.11.1.min.js 304 60ms
GET /stylesheets/style.css 304 58ms
GET /javascripts/bootstrap.min.js 304 70ms
GET / 304 5007ms
GET /stylesheets/bootstrap.min.css 304 43ms
GET /javascripts/jquery-1.11.1.min.js 304 43ms
GET /stylesheets/style.css 304 45ms
GET /javascripts/bootstrap.min.js 304 49ms
GET /fonts/glyphicons-halflings-regular.woff 304 24ms
GET /about 304 4519ms
GET /stylesheets/bootstrap.min.css 304 43ms
GET /javascripts/jquery-1.11.1.min.js 304 45ms
GET /stylesheets/style.css 304 47ms
GET /javascripts/bootstrap.min.js 304 48ms
GET /contact 304 3426ms
GET /stylesheets/bootstrap.min.css 304 58ms
GET /javascripts/jquery-1.11.1.min.js 304 61ms
GET /stylesheets/style.css 304 62ms
GET /javascripts/bootstrap.min.js 304 65ms
GET / 304 3072ms
GET /stylesheets/bootstrap.min.css 304 30ms
GET /stylesheets/style.css 304 45ms
GET /javascripts/jquery-1.11.1.min.js 304 46ms
GET /javascripts/bootstrap.min.js 304 40ms
GET /fonts/glyphicons-halflings-regular.woff 304 19ms
And when using the memory limit options in "/usr/bin/node", I get an "process out of memory" very quickly...
So I guess that a full-stack Node.js is just too much for the Yun, and that all that can be done are only very simple scripts.
But then, what is the point in using Node.js, then? Besides the "all-JS" advantage, why not use Python Tornado or Nginx/Lua-based OpenResty in this case?
Please note that I am novice to Node.js and that I like its overall philosophy. But I am also trying to be pragmatic and find the best solution for developing web applications on the Yun. As such, I am asking eagerly for advises and experience from other users!