# Help! Broke my installation

**URL:** <https://discourse.nodered.org/t/help-broke-my-installation/83403>\
**Category:** General\
**Created:** [3 December 2023 14:32 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403 "2023-12-03T14:32:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 14:32 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/1 "2023-12-03T14:32:49Z")

</div>

I was installing a new node via Palette manager and noticed that some others needed updating. All the node-red-contrib-\* worked fine but I got an error on node-red-node-sqlite and node-red-pushsafer. In the Palette, the first shows MODULE NOT FOUND and the second (which I am not so concerned about) shows a red square next to pushsafer in the 'in use' section.

Restarting NR fails with:

` +-------------------------------------------------  
Waiting for missing types to be registered:

- sqlitedb
- sqlite  
`

If there's no straightforward way to fix this problem, I do have a recent backup that I could restore from. What directories would need to be restored.

Thanks in advance for any help!

---

<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:** [3 December 2023 14:59 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/2 "2023-12-03T14:59:08Z")

</div>

You haven't told us what sort of installation of node red you have, or what OS you are running under. But assuming it is not a docker install then, in a command window, go into your .node-red folder and run  
`npm remove sqlite`  
`npm install sqlite`  
and copy/paste the result here.

Edit: Also start node-red in a command window and post the full output here.

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 15:49 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/3 "2023-12-03T15:49:05Z")

</div>

Sorry, it's on a Raspberry Pi under Raspbian. Thank you for your super-quick response (esp as it's Sunday!)

The remove|install sqlite commands proceeded normally. I am still seeing the same error in nodered:

```auto
Node-RED[19941]: 3 Dec 15:07:09 - [info] Waiting for missing types to be registered:
Node-RED[19941]: 3 Dec 15:07:09 - [info] - sqlitedb
Node-RED[19941]: 3 Dec 15:07:09 - [info] - sqlite
systemd[1]: Stopping Node-RED graphical event wiring tool...
Node-RED[19941]: 3 Dec 15:43:45 - [info] Stopping flows
Node-RED[19941]: 3 Dec 15:43:45 - [info] Stopped flows
systemd[1]: nodered.service: Succeeded.
systemd[1]: Stopped Node-RED graphical event wiring tool.
systemd[1]: nodered.service: Consumed 24.256s CPU time.
systemd[1]: Started Node-RED graphical event wiring tool.
Node-RED[21719]: 3 Dec 15:44:36 - [info]
Node-RED[21719]: Welcome to Node-RED
Node-RED[21719]: ===================
Node-RED[21719]: 3 Dec 15:44:36 - [info] Node-RED version: v3.1.1
Node-RED[21719]: 3 Dec 15:44:36 - [info] Node.js version: v16.19.1
Node-RED[21719]: 3 Dec 15:44:36 - [info] Linux 5.15.84-v7l+ arm LE
Node-RED[21719]: 3 Dec 15:44:38 - [info] Loading palette nodes
Node-RED[21719]: 3 Dec 15:44:45 - [info] Dashboard version 3.6.1 started at /ui
Node-RED[21719]: 3 Dec 15:44:47 - [error] [uibuilder:package-mgt:writePackageJson] Failed to copy package.json to backup. /home/pi/.node-red/uibuilder
Node-RED[21719]: 3 Dec 15:44:47 - [warn] ------------------------------------------------------
Node-RED[21719]: 3 Dec 15:44:47 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-arm/node_sqlite3.node'
Node-RED[21719]: Require stack:
Node-RED[21719]: - /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3-binding.js
Node-RED[21719]: - /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3.js
Node-RED[21719]: - /home/pi/.node-red/node_modules/.node-red-node-sqlite-3zfPEYD0/sqlite.js
Node-RED[21719]: - /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
Node-RED[21719]: - /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
Node-RED[21719]: - /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
Node-RED[21719]: - /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
Node-RED[21719]: - /usr/lib/node_modules/node-red/lib/red.js
Node-RED[21719]: - /usr/lib/node_modules/node-red/red.js
Node-RED[21719]: 3 Dec 15:44:47 - [warn] ------------------------------------------------------
Node-RED[21719]: 3 Dec 15:44:47 - [info] Settings file : /home/pi/.node-red/settings.js
Node-RED[21719]: 3 Dec 15:44:47 - [info] Context store : 'default' [module=localfilesystem]
Node-RED[21719]: 3 Dec 15:44:47 - [info] User directory : /home/pi/.node-red
Node-RED[21719]: 3 Dec 15:44:47 - [warn] Projects disabled : editorTheme.projects.enabled=false
Node-RED[21719]: 3 Dec 15:44:47 - [info] Flows file : /home/pi/.node-red/flows.json
Node-RED[21719]: 3 Dec 15:44:47 - [info] Server now running at http://127.0.0.1:1880/
Node-RED[21719]: 3 Dec 15:44:47 - [warn]
Node-RED[21719]: ---------------------------------------------------------------------
Node-RED[21719]: Your flow credentials file is encrypted using a system-generated key.
Node-RED[21719]: If the system-generated key is lost for any reason, your credentials
Node-RED[21719]: file will not be recoverable, you will have to delete it and re-enter
Node-RED[21719]: your credentials.
Node-RED[21719]: You should set your own key using the 'credentialSecret' option in
Node-RED[21719]: your settings file. Node-RED will then re-encrypt your credentials
Node-RED[21719]: file using your chosen key the next time you deploy a change.
Node-RED[21719]: ---------------------------------------------------------------------
Node-RED[21719]: 3 Dec 15:44:47 - [info] +-----------------------------------------------------
Node-RED[21719]: 3 Dec 15:44:47 - [info] | uibuilder v6.7.0 initialised 📗
Node-RED[21719]: 3 Dec 15:44:47 - [info] | root folder: /home/pi/.node-red/uibuilder
Node-RED[21719]: 3 Dec 15:44:47 - [info] | Using Node-RED's webserver at:
Node-RED[21719]: 3 Dec 15:44:47 - [info] | http://0.0.0.0:1880/
Node-RED[21719]: 3 Dec 15:44:47 - [info] | Installed packages:
Node-RED[21719]: 3 Dec 15:44:47 - [info] +-----------------------------------------------------
Node-RED[21719]: 3 Dec 15:44:48 - [info] Waiting for missing types to be registered:
Node-RED[21719]: 3 Dec 15:44:48 - [info] - sqlitedb
Node-RED[21719]: 3 Dec 15:44:48 - [info] - sqlite

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 December 2023 15:54 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/4 "2023-12-03T15:54:50Z")

</div>

> [@lorccan](#):
>
> ```auto
> Node-RED[21719]: 3 Dec 15:44:47 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-arm/node_sqlite3.node'
> 
> ```

Did you upgrade or change node version?

You likely need to do an `npm rebuild`

```auto
cd ~/.node-red
npm rebuild

```

Or, uninstall and reinstall the node-red-node-sqlite

```auto
cd ~/.node-red
npm remove node-red-node-sqlite
npm install node-red-node-sqlite

```

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 16:09 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/5 "2023-12-03T16:09:37Z")

</div>

> [@Steve-Mcl](#):
>
> You likely need to do an `npm rebuild`
> 
> ```auto
> cd ~/.node-red
> npm rebuild
> 
> ```

Thank you! I thought I had already done that (but it was suspiciously quick). Problem was that I was not in ~/.node-red when I ran it.

All is working again now.

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 16:18 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/6 "2023-12-03T16:18:55Z")

</div>

I spoke a bit too soon! Although the flows start up correctly now, I am still seeing MODULE\_NOT\_FOUND under node-red-node-sqlite in the Palette. I tried doing an `remove` and `install` of `node-red-node-sqlite`, but I hit an error with a not empty directory. I don't want to delete this without being sure I am not going to cause further harm. Here's the removal attempt:

```auto
~/.node-red $ npm remove node-red-node-sqlite
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/pi/.node-red/node_modules/detect-libc
npm ERR! dest /home/pi/.node-red/node_modules/.detect-libc-pGdKpy0q
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/pi/.node-red/node_modules/detect-libc' -> '/home/pi/.node-red/node_modules/.detect-libc-pGdKpy0q'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2023-12-03T16_11_43_599Z-debug-0.log

```

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [3 December 2023 16:28 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/7 "2023-12-03T16:28:22Z")

</div>

There is a discussion [here](https://discourse.nodered.org/t/enotempty-when-installing-node-from-palette-since-nodered-3-0-directory-not-empty/65968/13) about similar problems with updating nodes.  
They seem to suggest that deleting the file / folder - in your case `/home/pi/.node-red/node_modules/detect-libc` ? will let you successfully install.  
It's not a very helpful error message though, does it mean rename it to .detect-libc-pGdKpy0q or does the -\> mean something else?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 December 2023 17:18 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/8 "2023-12-03T17:18:34Z")

</div>

> [@lorccan](#):
>
> `/home/pi/.node-red/node_modules/.detect-libc-pGdKpy0q`

Delete this ☝ and do it again

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 18:36 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/9 "2023-12-03T18:36:38Z")

</div>

Thank you all for your help. I tried deleting the directory and next time I just got a different directory. I kept deleting these and running the `remove` again (on the basis that the initial letter of each was further along the alphanumeric order) until I was able to get the command to run all the way through. I then did `npm install node-red-node-sqlite`. Although this ran to completion, when I restarted nodeRED everything was such a mess (complaints still that sqlite was still missing and failure to start flows as a result) that I decided I would restore from a backup and now all is back to normal.

I've learnt not to try updating a node in the Palette unless its name contains 'contrib'. I don't really understand why pushsafer doesn't have contrib in its name, but there was a slew of warnings about potential security exploits when I was trying to troubleshoot it alongside by sqlite woes that I have removed it from my flows, deleted its config nodes and removed it from my system.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 December 2023 18:53 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/10 "2023-12-03T18:53:03Z")

</div>

I seem to remember the was a problem with a specific version of npm. You probably want to update that.

Also, you didn't answer:

> [@Steve-Mcl](#):
>
> Did you upgrade or change node version

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 19:29 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/11 "2023-12-03T19:29:10Z")

</div>

> [@Steve-Mcl](#):
>
> Did you upgrade or change node version?

Sorry, I missed that. No, I did not update node or npm. I am running `homebridge` on the same platform and it's using node v20.10.0 whereas nodeRED seems to be using v16.19.1 (or at least that's what I get with `node -v`). I'm unclear what determines which node nodeRED is using.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 December 2023 19:35 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/12 "2023-12-03T19:35:21Z")

</div>

> [@lorccan](#):
>
> nodeRED seems to be using v16.19.1 (or at least that's what I get with `node -v`). I'm unclear what determines which node nodeRED is using

Press ctrl+shift+v, type system info, that will tell you exactly what node version node-red is using.

As for staying homebridge reports v20 but node -v reports v16 suggests either docker is involved or a node version manager is installed. Both can pose their own complications.

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 19:39 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/13 "2023-12-03T19:39:18Z")

</div>

Where do I type ctrl+shift+v? That sounds very Windows-y to me.

That's what I don't get. There's no Docker or nvm installation.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 December 2023 19:49 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/14 "2023-12-03T19:49:18Z")

</div>

> [@lorccan](#):
>
> Where do I type ctrl+shift+v

I'm sure you could look at all the keys on your keyboard and try a similar named key like `cmnd`.

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [3 December 2023 20:00 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/15 "2023-12-03T20:00:56Z")

</div>

> [@Steve-Mcl](#):
>
> I'm sure you could look at all the keys on your keyboard and try a similar named key like `cmnd`.

If you mean I should type these keys when in the web editor, they (or any alternative combinations) don't do anything. I can't find anything like that in the keyboard shortcuts. (All of those point to items I can get to through the web interface menu system.) I'm surprised it's not in a config file somewhere.

Anyway, I'll press on in ignorance for now. Thanks for your help!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 December 2023 20:13 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/16 "2023-12-03T20:13:10Z")

</div>

I got it wrong too 🤦‍♂️

It's "press ctrl+shift+p" (shortcut - I never said "type")

Here is the non shortcut version:

> [@Cronplus Sunset](https://discourse.nodered.org/t/cronplus-sunset/82621/14):
>
> Which is why I asked for other details: Please provide the info requested. You can get this from the "System Info" CTRL+SHIFT+P [chrome\_gsuyaqA1Za] Also, remove the timezone from the "Timezone" field as requested. This is normal for tooltips - that is why I use a shortcut (Print Screen button in my case)

---

<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:** [3 December 2023 20:21 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/17 "2023-12-03T20:21:12Z")

</div>

If you ever get stuck with these things, just note that you can always delete the `node_modules` folder. All you need to do afterwards is to do an `npm install` afterwards to get everything set up again.

Of course, on a Pi, the rebuild can take a few minutes.

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [4 December 2023 11:20 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/18 "2023-12-04T11:20:14Z")

</div>

> [@Steve-Mcl](#):
>
> It's "press ctrl+shift+p" (shortcut - I never said "type")

Thanks. That works for me now. I wasn't distinguishing between 'press' and 'type' - I understood what you meant. Apologies that I was a bit short. I was getting frustrated by that point!

---

<div class="post-metadata">

**Author:** ![lorccan](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lorccan](https://discourse.nodered.org/u/lorccan)\
**Post date:** [4 December 2023 11:21 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/19 "2023-12-04T11:21:09Z")

</div>

> [@TotallyInformation](#):
>
> you can always delete the `node_modules` folder. All you need to do afterwards is to do an `npm install` afterwards to get everything set up again

Thank you. That's useful to know.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 February 2024 11:21 UTC](https://discourse.nodered.org/t/help-broke-my-installation/83403/20 "2024-02-02T11:21:51Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
