You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hardware/raspberrypi.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ title: Running on Raspberry Pi
4
4
---
5
5
6
6
From June 2018 Node-RED can be installed from the Pi Menu - Preferences - Recommended Software application installed on the Raspbian SD card image that can be downloaded from [RaspberryPi.org](https://www.raspberrypi.org/downloads/raspbian/). If installed in this manner it can be upgraded either by using `sudo apt-get upgrade` or using the script below.
7
-
Once the script below has been run then you upgrade by re-running the script.
7
+
Once the script below has been run, you should upgrade by re-running the script.
8
+
If you decide to stick with apt to install npm then you must upgrade it to the latest by `sudo npm i -g npm` before adding any extra nodes.
8
9
9
10
### Install / Upgrade
10
11
@@ -22,7 +23,7 @@ On really minimal Debian installs you may want to `sudo apt-get install build-es
22
23
Nodes can be now be managed via the built in palette manager. However the default Pi install pre-loads some
23
24
nodes globally and these cannot then be easily managed and updated. The intention of the script is to...
24
25
25
-
- upgrade an existing user to LTS 6.x or 8.x Node.js and latest Node-RED
26
+
- upgrade an existing user to LTS 8.x Node.js and latest Node-RED
26
27
- migrate any existing globally installed nodes into the users ~/.node-red space so they can be managed via the palette manager
27
28
- optionally (re)install the extra nodes that are pre-installed on a full Raspbian Pi image
28
29
@@ -39,7 +40,7 @@ The script will perform the following steps
39
40
- remove any node-red binaries from /usr/bin and /usr/local/bin
40
41
- remove any node-red modules from /usr/lib/node_modules and /usr/local/lib/node_modules
41
42
- detect if Node.js was installed from Node.js package or Debian
42
-
- if not v6 or newer - remove as appropriate and install latest v8 LTS (not using apt). It will leave Node.js 6 installs as-is.
43
+
- if not v8 or newer - remove as appropriate and install latest v8 LTS (not using apt).
43
44
- clean out npm cache and .node-gyp cache to remove any previous versions of code
44
45
- install Node-RED latest version
45
46
- re-install under the user account any nodes that had previously been installed globally
@@ -64,6 +65,12 @@ To see the list of nodes you had installed:
64
65
cd ~/.node-red
65
66
npm ls --depth=0
66
67
68
+
**Note**: It does not update any nodes you had previously installed locally. To do that go into your user directory and run the commands below. The versions of some nodes may be fixed by the `package.json` file in that directory - you may need to hand edit this to select the versions you require before running `npm update`.
69
+
70
+
cd ~/.node-red
71
+
npm outdated
72
+
npm update
73
+
67
74
68
75
#### Swapping SD Cards
69
76
@@ -90,11 +97,13 @@ If you want Node-RED to run when the Pi boots up you can use
90
97
91
98
sudo systemctl enable nodered.service
92
99
100
+
and likewise `sudo systemctl disable nodered.service` to disable autostart on boot.
101
+
93
102
94
103
#### Adding nodes to preloaded version
95
104
96
105
To add additional nodes you must first install the `npm` tool, as it is not included
97
-
in the default Raspbian installation. This is not necessary if you have upgraded to Node.js 6.x.
106
+
in the default Raspbian installation. This is not necessary if you have upgraded to Node.js 8.x.
98
107
99
108
The following commands install `npm` and then upgrade
0 commit comments