# Dowgrading Node.js on raspberry

**URL:** https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945
**Category:** General
**Created:** [13 March 2019 20:47 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945 "2019-03-13T20:47:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![RobBekke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robbekke/32/2029_2.png) [@RobBekke](https://discourse.nodered.org/u/RobBekke)
#### Post date: [13 March 2019 20:47 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/1 "2019-03-13T20:47:45Z")

</div>

Hi all,  
I use NR 0.20 on a Raspberry pi. I would like to use the Noble Node to be able to read the Ruuvitag via BLE. According to the makers, there is an issue with the NodeJS 10 version. Is there a possibility to downgrade the current version to e.g. version 8? Have looked at NVM, the default NodeJS is now 8, but when starting Nodered, 10.15.3 remains reported. Can anyone help me.  
Rob

---

<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: [13 March 2019 21:28 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/2 "2019-03-13T21:28:29Z")

</div>

Assuming you used the pi install/upgrade script to install it, and assuming it is not a Pi Zero then first uninstall nodejs  
`sudo apt-get remove nodejs`  
Then edit the file `/etc/apt/sources.list.d/nodesource.list`. You should find it contains something like

```auto
deb https://deb.nodesource.com/node_10.x jessie main
deb-src https://deb.nodesource.com/node_10.x jessie main

```

Change the 10 to 8 on each line. Then run

```bash
sudo apt-get update
sudo apt-get install nodejs

```

---

<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: [13 March 2019 21:40 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/3 "2019-03-13T21:40:18Z")

</div>

Not sure whether you then have to rebuild everything for the new nodejs. Someone else can perhaps comment on that.

---

<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: [13 March 2019 22:00 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/4 "2019-03-13T22:00:36Z")

</div>

Right, after downgrading you should follow the advice in the Upgrading node.js section of  
[https://nodered.org/docs/getting-started/upgrading](https://nodered.org/docs/getting-started/upgrading)

---

<div class="post-metadata">

### Author: ![RobBekke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robbekke/32/2029_2.png) [@RobBekke](https://discourse.nodered.org/u/RobBekke)
#### Post date: [13 March 2019 22:11 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/5 "2019-03-13T22:11:37Z")

</div>

Colin,  
Thanks you for your quick respons. I will give it a try.  
I will let you know if it helps me.  
Rob

---

<div class="post-metadata">

### Author: ![RobBekke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robbekke/32/2029_2.png) [@RobBekke](https://discourse.nodered.org/u/RobBekke)
#### Post date: [13 March 2019 22:42 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/6 "2019-03-13T22:42:00Z")

</div>

Node.js version seems downgraded. 🙂

nodered editor gives an error:  
Flows stopped due to missing node types.

- sqlitedb

node-red-log gives an warning  
13 Mar 22:19:17 - [warn] [node-red-node-sqlite/sqlite]  
Error: Cannot find module '/home/pi/.node-red/node\_modules/sqlite3/lib/binding/node-v57-linux-arm/node\_sq lite3.node' (line:4)  
I have tried to reinstall sqlite-node. But that didn't solve the problem.

Any clue?  
Rob

---

<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: [13 March 2019 22:54 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/7 "2019-03-13T22:54:49Z")

</div>

yeah this is due to the downgrade...  
uninstall sqlite-node - and also uninstall the node-red-node-sqlite node - then in the `~/.node-red` directory run an `npm clean --force` then reinstall the node-red node (only) - as per it's readme

```
npm i --unsafe-perm node-red-node-sqlite

```

and then prepare to wait - it seems to take about 40 minutes or so to rebuild

---

<div class="post-metadata">

### Author: ![RobBekke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robbekke/32/2029_2.png) [@RobBekke](https://discourse.nodered.org/u/RobBekke)
#### Post date: [19 March 2019 12:20 UTC](https://discourse.nodered.org/t/dowgrading-node-js-on-raspberry/8945/8 "2019-03-19T12:20:09Z")

</div>

> [@dceejay](#):
>
> nstall sqlite-node - and also uninstall the node-red-node-sq

Tnx. That did the job.  
Rob
