Upgrade node.js

This should work for both the BeagleBone and the BeagleBone Black. Tested on BeagleBone Black rev B.

Prerequisites

  1. opkg update
  2. opkg install python-shell
  3. opkg install python-compiler
  4. opkg install python-misc
  5. opkg install python-multiprocessing
  6. opkg install python-compression
  7. opkg install python-simplejson

Build and install new version

  1. Go to http://nodejs.org/download/ and copy the link to the source code
  2. Open a terminal window on the BeagleBone
  3. Create a temp directory, e.g. ~/nodejs
  4. cd ~/nodejs
  5. Download the source using the source code link, e.g.: wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
  6. Unpack the source: tar zxvf node-v0.10.28.tar.gz
  7. cd node-v0.10.28
  8. ./configure --without-snapshot --prefix=/usr
  9. make
  10. make install

And setup the node path to modules for all users and processes:

  1. echo "export NODE_PATH=/usr/lib/node_modules" > /etc/profile.d/nodejs.sh
Finally, you can delete the temporary directory and the .tar.gz file.


Verify the version installed with the command: node --version





Comments