# Node-Red Install RPI issues

**URL:** https://discourse.nodered.org/t/node-red-install-rpi-issues/6120
**Category:** General
**Created:** [25 December 2018 07:37 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120 "2018-12-25T07:37:02Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 07:37 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/1 "2018-12-25T07:37:03Z")

</div>

Ok, I give up.. I've had people saying there's a problem with "the script" and Node-Red. Turns out NPN 8 can be an issue (my working clones use npm 6.41) - so I used "the script" myself and sure enough... I even manually updated Node and used Dave CJ's script to updsate/upgrade Node-Red/Node.. still wiping nodes out. For now I'm advising people to unselect NR from "the script" and do their own thing. Is there a single place where there is definitive advise for RPI - assuming starting with standard RASPBIAN FULL (with or without extra desktop stuff) - how to get fully up to date NR and for example SERIAL NODE I2c and SQLITE nodes... I think those 3 are also part of the problem along with Node 8 which has a habit of appearing during upgrades.

If someone can advise I'll redo that section of "the script" to incorporate DaveCJ's script and whatever else is needed. Until Node 8, the only (easily resolved issue used to be the serial node but now I've just lot all extra nodes again. There has to be a better way.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 December 2018 09:59 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/2 "2018-12-25T09:59:29Z")

</div>

I don't see where you have said exactly what the problem with the standard script is, apart from "still siping nodes out" which I don't understand. Or is it the versions of the some particular nodes that is the problem?

---

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 10:18 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/3 "2018-12-25T10:18:58Z")

</div>

Simple early morning spelling errors Colin - now corrected. For the last few months I've had the odd persion griping about issues with "the script" - see [https://tech.scargill.net](https://tech.scargill.net) for more. In all cases it is Raspberry Pi owners and Node-Red - usually where serial, i2c and/or sqlite are involved. I just took what seemed like a working setup, tried to add (in the home/pi/.node-red directory) npm install better-sqlite3 - I stopped Node-Red, did the install, started Node-Red and a ton of node had disappeared. Note - I have a clone Rasapbian setup from a couple of months ago, maybe 3 - which will update/upgrade no problem. It is using npm 6.41 and upgrades just work.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [25 December 2018 10:29 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/4 "2018-12-25T10:29:53Z")

</div>

You say "turns out NPN 8 can be an issue" ... npm is only at 6.4.1 (or 6.5 maybe). So do you mean node 8 ? If so the main issue tends to be going from node 4 or 6 to 8 where the nodes you mention all have a binary component and that needs to be rebuilt using npm rebuild in the ~/.node-red directory where any of your extra nodes are.

You then mention better-sqlite3 - this is not used by any of the Node-RED nodes (that you mention so far) - so hopefully you are installing this elsewhere in your directory tree as (given the name) it may well clash with the sqlite3 that node-red-node-sqlite installs.

Note: as mentioned elsewhere when installing this node (using `npm i --unsafe-perm node-red-node-sqlite`) it can take 20-30 mins to recompile all the binaries.

(PS - actually I was looking at that better-sqlite3 library as a possible "upgrade" to the node - but that's a different thought/thread)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 December 2018 11:18 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/5 "2018-12-25T11:18:13Z")

</div>

The other issue you might get with later npm (though I thought it was from version 5.x on) is that any nodes that are not mentioned in package.json are silently removed. So if they were installed with an earlier version, and --save was not specified, then an upgrade of npm will remove those nodes. Not very user friendly of npm. --save is now the default, from command line or NR palette manager, so this should be a one off situation.

---

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 11:53 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/6 "2018-12-25T11:53:15Z")

</div>

Out now dropping off kids.. good grief you could be my saviour... If so what a STUPID default. I will test later today for sure, thank heavens for backups.

Pete

---

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 11:54 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/7 "2018-12-25T11:54:41Z")

</div>

Oh.. everything was installed with V6. Will check later. Ta.

Pete

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 December 2018 12:02 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/8 "2018-12-25T12:02:41Z")

</div>

> [@scargill](#):
>
> thank heavens for backups.

It is not a disaster anyway, all you have to do is to re-install any additional nodes.

---

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 12:40 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/9 "2018-12-25T12:40:05Z")

</div>

Warm.. dozens of them.

---

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 14:40 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/10 "2018-12-25T14:40:13Z")

</div>

As usual – I’m getting confused between the two… on my working kit I have node 8. 14.0 and NPM 6.4.1 – does that clarify?

I keep forgetting about the –unsafe-perm… thanks for that. And Colin in here has suggested I need to ensure I use npm –save. Of course in an ideal world we should be doing the lot in Node Red Manage Palette… ok, I’ll make changes to see if I can crack this. With NPM 6.4.1

Pete

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 December 2018 15:03 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/11 "2018-12-25T15:03:22Z")

</div>

> [@scargill](#):
>
> I need to ensure I use npm –save.

It is not necessary, it is now the default.

---

<div class="post-metadata">

### Author: ![scargill](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scargill/32/1118_2.png) [@scargill](https://discourse.nodered.org/u/scargill)
#### Post date: [25 December 2018 16:41 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/12 "2018-12-25T16:41:25Z")

</div>

Colin – please clarify….. where does –save apply?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 December 2018 17:06 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/13 "2018-12-25T17:06:28Z")

</div>

With later versions of npm it is the default on command line and palette manager

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 December 2018 20:35 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/14 "2018-12-26T20:35:47Z")

</div>

These are not the only problems with newer versions of npm.

I note that now, npm has a tendency to override the version specification you might have put in manually to your package.json file. So that maybe you thought you would get all new updates (e.g. "\*") but installing via npm changes the spec to a more specific version string. Annoying.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 December 2018 21:42 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/15 "2018-12-26T21:42:14Z")

</div>

> [@TotallyInformation](#):
>
> npm has a tendency to override the version specification you might have put in manually to your package.json file

I _think_ the fact that you `npm install <the package>` (with the implicit --save) that npm considers that you want it to put what it thinks best into package.json. If you manually put it into package.json then you can just run  
`npm install`  
and it will install anything that is not installed, according the spec in package.json, and will not change that file. There is likely a --nosave option or similar that you could use instead though I haven't looked it up.

---

<div class="post-metadata">

### Author: ![borpin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/borpin/32/1765_2.png) [@borpin](https://discourse.nodered.org/u/borpin)
#### Post date: [28 December 2018 18:05 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/16 "2018-12-28T18:05:51Z")

</div>

I had an issue with an 'up to date' installation of Node-Red in that some modules did not like nodejs above V8. The best solution I have found is to install **n**.

```auto
npm i -g --unsafe-perm n

```

You can then select whatever version of nodejs you need and Node-Red just uses it. Unfortunately you can't have more than one version of nodejs at once, but it works remarkably well.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [28 December 2018 20:17 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/17 "2018-12-28T20:17:05Z")

</div>

At the time of writing Nodejs v8 is the recommended version.  
The latest recommended version of Nodejs can be found here  
[https://nodered.org/docs/getting-started/installation](https://nodered.org/docs/getting-started/installation)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 December 2018 22:04 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/18 "2018-12-28T22:04:01Z")

</div>

> [@ukmoose](#):
>
> At the time of writing Nodejs v8 is the recommended version.

I believe the intention is to raise that to 10 at some point in the not too distant future. For any nodes you find that are not compatible with node 10 it would be a good idea to raise an issue for the node. @borpin Can you tell us examples of ones you have problems with?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [28 December 2018 23:31 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/19 "2018-12-28T23:31:07Z")

</div>

Agreed. Node v8 did deprecate quite a few things that have now finally been removed in v10. So going to v10 does seem to break more things. What in particular are you seeing ? As Colin suggests we should try to get them updated if possible, though they are often outside of our control

---

<div class="post-metadata">

### Author: ![borpin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/borpin/32/1765_2.png) [@borpin](https://discourse.nodered.org/u/borpin)
#### Post date: [29 December 2018 09:49 UTC](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120/20 "2018-12-29T09:49:55Z")

</div>

> [@dceejay](#):
>
> What in particular are you seeing ?

It was when using BLE. I've got it working now by downgrading from V11 using **n**

I _think_ it was this node [GitHub - noble/node-bluetooth-hci-socket](https://github.com/noble/node-bluetooth-hci-socket) which was used by this node [GitHub - eschava/node-red-contrib-xiaomi-ble: Xiaomi Bluetooth4 (BLE) sensors](https://github.com/eschava/node-red-contrib-xiaomi-ble)

I have it working now so loath to play with it _Ain't broke, don't fix_ scenario - the Pi in question runs my Zigbee and BLE presence detection.

[Next page](https://discourse.nodered.org/t/node-red-install-rpi-issues/6120.md?page=2)
