35
votes
Getting NPM installed on Raspberry Pi (Wheezy Image)
This is the best way to install NodeJs on raspberry pi, i love that way, and i think it's easy to to do, and later for update just replace the '/opt/nodejs' folder with the new release:
wget https://...
29
votes
Install Node.js on an SD card to work on all Pi models
The reason why this is not working on your Raspberry Pi 1 is, that these packages are compiled for the wrong CPU - armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)
So the package ...
11
votes
Accepted
Install Newer Node Version on Pi 3
I installed node.js using the second method in the question today, worked just fine.
I have Raspbian Jessie on a Raspberry 3.
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-...
9
votes
Accepted
Node.js v0.11.14 exits with "Illegal Instruction"
This is still an unresolved issue with the newest version of Node (as of this writing, v0.12.2)
When browsing Node distributions, the latest ARM build is in v0.11.9, meaning you will currently need ...
8
votes
Accepted
Problems with installing Node.js NPM package
I have seen this before on the Pi, where packages that are compiled by gyp refuse to compile or install. One method of getting around this problem is to install a precompiled binary.
To do this ...
7
votes
Accepted
Determine if running on a Raspberry Pi in Node.js
To check for Raspbian read the file /etc/os-release and check for ID=raspbian.
PRETTY_NAME="Raspbian GNU/Linux jessie/sid"
NAME="Raspbian GNU/Linux"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
...
7
votes
How to install node.js with GPIO
For example to install RPi nodejs version 4.3.1 (see below for other versions)
wget https://nodejs.org/dist/v4.3.1/node-v4.3.1-linux-armv6l.tar.xz
tar xf node-v4.3.1-linux-armv6l.tar.xz
cd node-v4....
6
votes
Determine if running on a Raspberry Pi in Node.js
Based on joan's answer I've created a tiny Node.js library. It can be used to check if node is currently running on the RPi.
You can install it through:
npm install detect-rpi --save
To use it, you ...
6
votes
Problems with installing Node.js NPM package
You should install libasound2 first:
sudo apt-get install libasound2-dev
6
votes
Install Node.js on an SD card to work on all Pi models
In one line of code, latest version, for any raspberry pi:
wget -O - https://raw.githubusercontent.com/audstanley/NodeJs-Raspberry-Pi/master/Install-Node.sh | sudo bash;
node -v;
Source code:
https:/...
6
votes
Accepted
Raspberry Pi 3 Raspbian open port or make my webapp accessible from LAN
To be able to connect to 127.0.0.1 (in other words the loopback IP) does not mean that the server app is bound to all network interfaces of the system.
To listen all existing or will be existed ...
6
votes
Accepted
How to install Nodejs v12 on Raspi Zero (ARMv6 not available for download anymore)?
As of about April last year, it seems, NodeJS support for Armv6 moved to experimental see this thread for the RFC / discussion / reasoning etc. Armv6 is still supported and maintained on an ...
5
votes
Accepted
How do I maximize a headless Pi to run node.js?
A good way is to take a minimal image and bolt on the things you need your self.
This 118mb minimal image is hard float compiled so some computational methods should be allot faster and only takes up ...
5
votes
Node.Js on raspbian not found with Sudo
I definitely think this has to do with your PATH. An easy way to check this is to compare the output of echo $PATH with the output of sudo echo $PATH. If the node.js directory is present in the first ...
5
votes
Accepted
Raspberry pi port forwarding with nodejs server
I'm port forwarding on my Raspberry Pi by adding these lines right before the exit line in /etc/rc.local:
# Forward port 80 to 5000 (where our web server is) so the
# web server can run at normal ...
4
votes
Accepted
Node.Js on raspbian not found with Sudo
Eventually, it might be easier to get rid of your current installation based on your linked guide and try to follow the very simple steps offered by Adafruit.
https://learn.adafruit.com/node-embedded-...
4
votes
Getting NPM installed on Raspberry Pi (Wheezy Image)
Adafruit provides a (relatively) current node and npm. After not finding a compile helpful this worked for me with a number of packages (express, body-parser, pg)
4
votes
Controlling Raspberry Pi GPIO ports using node.js
I suggest using this module to switch and read GPIO pins, it is easy to handle and works very well: https://www.npmjs.com/package/onoff
Another module: https://www.npmjs.com/package/rpio
4
votes
Installing node.js on v1 Model B - segmentation fault
Eventually I've used a compiled version (node.js v12.02) by Conor O'Neill that applied a patch:
http://conoroneill.net/download-compiled-version-of-nodejs-0121-stable-for-raspberry-pi-here
The steps ...
4
votes
Install Newer Node Version on Pi 3
How to install
wget https://nodejs.org/dist/v5.0.0/node-v5.0.0-linux-armv7l.tar.gz
tar -xvf node-v5.0.0-linux-armv7l.tar.gz
cd node-v5.0.0-linux-armv7l
sudo cp -R * /usr/local/ #attention copies also ...
4
votes
Accepted
Running a persistent node js server on boot and keeping the command line open
I found the solution after all. I used pm2 after all. The quick start suggested at the start of the pm2 documentation will not work. Follow the detailed instructions instead, which amount to:
Install ...
4
votes
Accepted
Wireless communication between a RPI and a Android app - without internet
You can setup an access point on the RasPi so the smartphone can connect to it. There are hundreds of tutorials about this on the web, but many of them are outdated. The official Raspberry Pi web site ...
4
votes
Accepted
`npm` and `nodejs` incompatibilities
Packaged on debian based distribution:
sudo apt install tldr
With npm:
Install a supported nodejs version:
curl -sL https://deb.nodesource.com/setup_current.x | sudo bash -
sudo apt install nodejs
...
3
votes
Getting NPM installed on Raspberry Pi (Wheezy Image)
I find the easiest way to get NPM (and the latest version of Node.js) on any Raspberry PI (Zero to 3) is to use "NVM" (Node Version Manager).
To install NVM:
wget -qO- https://raw.githubusercontent....
3
votes
How do I maximize a headless Pi to run node.js?
If your main focus is to enhance performance you can lower the allocated GPU memory, since you wont be doing graphical tasks.
To achieve this you must define the RAM available to 16MB by editing /...
3
votes
How to change gpio directory for node.js pi-gpio?
When the latest package raspberrypi-bootloader:armhf 1.20150130-1 was installed, the gpio symbolic links in /sys/class/gpio/ moved from /sys/devices/virtual/ to /sys/devices/soc/20200000.gpio.
...
3
votes
Accepted
PIGPIO stream pwm data over websockets with nodejs. GPIO
The commands you can send via the pipe interface are shown at http://abyz.me.uk/rpi/pigpio/pigs.html
For the pipe interface each command should be terminated in a new line character ("\n") and you ...
3
votes
Accepted
Seeing "modprobe: not found" using nodejs and raspi-io
modprobe is not in a standard user's path as it is not runnable as a standard user. It requires superuser privileges to run.
If you use the command sudo modprobe the command will be found. sudo ...
3
votes
Cannot Install Node.js. Error: "GLIBC_2.16"
Steve Robillard was correct. I need to install Debian Jessie.
3
votes
Cannot Install Node.js. Error: "GLIBC_2.16"
If you want to stick with stock Raspbian, Adafruit has a repository that includes, among other things, Node v0.12.6.
~/ghost% node -v
v0.12.6
~/ghost% lsb_release -d
Description: Debian GNU/Linux ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
node.js × 223raspbian × 62
gpio × 32
web-server × 17
pi-3 × 16
javascript × 14
python × 13
networking × 10
pi-2 × 9
pi-zero-w × 8
pigpio × 8
rpi.gpio × 7
software-installation × 7
pi-4 × 6
bluetooth × 6
pi-3b+ × 5
linux × 5
serial × 5
arduino × 5
mongodb × 5
boot × 4
sensor × 4
led × 4
wiringpi × 4
servo × 4