nathanjohnson320
Posts: 4
Joined: Thu Sep 05, 2013 5:45 pm

Installing node.js (please test)

Thu Sep 05, 2013 5:50 pm

Hello everyone,

I figured I would share this with everyone in hopes that it saves you some time. This application lets you download a node.js package and install it without the need for compiling from source. It takes two steps:

Code: Select all

wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
you can check the installation with

Code: Select all

node -v
Please test it out and let me know if it works.

https://github.com/nathanjohnson320/node_arm

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Installing node.js (please test)

Thu Sep 12, 2013 4:27 pm

SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

garethcoleman
Posts: 4
Joined: Fri Jul 20, 2012 10:16 am

Re: Installing node.js (please test)

Tue Sep 17, 2013 4:31 pm

Just to let you know I followed these instructions on 0.2 occidentalis and they worked perfectly, getting me the latest node.js version (0.10.18).

Thanks loads, now I'm off to use it with node-RED http://nodered.org/ and WiringPi!

carride
Posts: 6
Joined: Sat Nov 09, 2013 12:21 am
Contact: Website

Re: Installing node.js (please test)

Sat Nov 09, 2013 2:28 am

Did you Make that deb file you are hosting from the NodeJs.org source or from their binary distro? Do you automatically update when they create the new distribution? I wanted to install the latest Node.js binaries directly from Joyent, so here are my notes. Similar to what some others are doing.
https://gist.github.com/7345428#file-ra ... node-js-md

User avatar
duberry
Posts: 379
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour

Re: Installing node.js (please test)

Sat Nov 09, 2013 9:36 am

hi
i use some other (non debian based ) disto's

and to install nodejs i have used ( use with caution always backup ! )

Code: Select all

# node_url="http://nodejs.org/dist/v0.10.21/node-v0.10.21-linux-arm-pi.tar.gz"
# wget "$node_url"
#
node_bin="node-v0.10.21-linux-arm-pi.tar.gz"
sudo tar zxf $node_bin --strip-components=1  -C / 
for an brief explanation of the command / arguments used see
explainshell.com/explain?cmd= tar zxf $node_bin --strip-components=1 -C

i think this can work on any linux !
although
https://gist.github.com/7345428#file-ra ... node-js-md
this method looks a little more thought out than my simple script

also if you like after installing nodejs you can install https://npmjs.org/package/n - node version manager
using

Code: Select all

npm install n
.. its possible to install 'n' before installing nodejs ( its just a shell script )
see https://github.com/visionmedia/n/blob/master/bin/n
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi

carride
Posts: 6
Joined: Sat Nov 09, 2013 12:21 am
Contact: Website

Re: Installing node.js (please test)

Sat Nov 09, 2013 2:38 pm

Good point with Vision media's N node version management. I'll have to test if it works with the arm-pi distributions. If so, perhaps that is the most reliable way to install Node after first installing NPM.

Thanks for http://explainshell.com site too.

nathanjohnson320
Posts: 4
Joined: Thu Sep 05, 2013 5:45 pm

Re: Installing node.js (please test)

Wed Nov 13, 2013 10:31 pm

Sorry for the late reply,

I wrote a script that downloads and compiles the source whenever they update the changelog website. It's running on a crontab on my pi every four hours which keeps it up to date.

carride
Posts: 6
Joined: Sat Nov 09, 2013 12:21 am
Contact: Website

Re: Installing node.js (please test)

Sat Nov 16, 2013 5:40 pm

Got it. You are building from the original source. Thanks for the update.

gsnneequaye
Posts: 1
Joined: Mon Nov 25, 2013 9:42 pm

Re: Installing node.js (please test)

Tue Nov 26, 2013 2:48 am

Thank you so so much for this, very easy and reliable. I can now proceed to complete my project :) :)

nedyalkov
Posts: 1
Joined: Wed Dec 18, 2013 8:01 am

Re: Installing node.js (please test)

Wed Dec 18, 2013 8:08 am

Thank you for sharing this information! It works like a charm :)

imajin
Posts: 1
Joined: Sun Dec 29, 2013 10:38 pm

Re: Installing node.js (please test)

Sun Dec 29, 2013 10:51 pm

totally sweet. This save me time and worked perfectly, big thanks!

GrantsPi
Posts: 3
Joined: Sun Jun 30, 2013 12:44 am

Re: Installing node.js (please test)

Sun Jan 05, 2014 6:19 am

Works great! Thank you for posting it.

rwhitmire
Posts: 1
Joined: Tue Feb 18, 2014 3:12 am

Re: Installing node.js (please test)

Tue Feb 18, 2014 3:14 am

i made an account just to thank you. I've been struggling to get the latest version of node installed on my pi all night and your package solved my problem :D

Heater
Posts: 13080
Joined: Tue Jul 17, 2012 3:02 pm

Re: Installing node.js (please test)

Tue Feb 18, 2014 1:25 pm

duberry,
sudo tar zxf $node_bin --strip-components=1 -C /
No way!

As root user you are going to change to the root of your file system "/" and pull the trigger on untaring a package which you hope does not splatter stuff all over the place and destroy your system.

User avatar
duberry
Posts: 379
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour

Re: Installing node.js (please test)

Tue Feb 18, 2014 7:18 pm

If you have tar and curl installed n.sh works :!:
(dont use my crazy tar arg's ; unless your mad or have made a backup ;or do so at your peril)
Heater wrote:
sudo tar zxf $node_bin --strip-components=1 -C /
No way!
As root user you are going to change to the root of your file system "/" and pull the trigger on untaring a package which you hope does not splatter stuff all over the place and destroy your system.
Way !
+ i get-a fresh one (system) on rebooting ....
To destroy the system now n then (because of the digital nature of these system(s) it)
gives the opportunity to 'fix' or at least restore it...
And then append to the list of "dont do X that will destroy your system"!

IIRC the distant past my list started with- dont "delete autoexec.bat" that will destroy your system. :oops:
... probably trying to get a game working from some magazine free demo floppy disks
.. the system was not mine
and i imagine it cost a fair bit more than $35 ! :lol:
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi

Return to “Raspbian”