Help node-red does not start after update sqllite

I did an update of one my modules within node-red (palette) module: sqllite and now node-red does not start anymore..
So i cant update it again via my node-red webpage

Anyone an idea how to solve this?
i also tried sudo npm install sqllite3 but that also gives an error

19 Sep 12:44:55 - [info] Node-RED version: v1.1.2
19 Sep 12:44:55 - [info] Node.js  version: v12.16.1
19 Sep 12:44:55 - [info] Linux 4.19.97-v7l+ arm LE
19 Sep 12:44:56 - [info] Loading palette nodes
19 Sep 12:44:58 - [info] Worldmap version 2.5.3
19 Sep 12:44:59 - [info] Dashboard version 2.23.2 started at /ui
19 Sep 12:44:59 - [warn] ------------------------------------------------------
19 Sep 12:44:59 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node'
Require stack:
- /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3-binding.js
- /home/pi/.node-red/node_modules/sqlite3/lib/sqlite3.js
- /home/pi/.node-red/node_modules/node-red-node-sqlite/sqlite.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
19 Sep 12:44:59 - [warn] ------------------------------------------------------
19 Sep 12:44:59 - [info] Settings file  : /home/pi/.node-red/settings.js
19 Sep 12:44:59 - [info] Context store  : 'default' [module=memory]
19 Sep 12:44:59 - [info] User directory : /home/pi/.node-red
19 Sep 12:44:59 - [info] Server now running at https://127.0.0.1:1880/
19 Sep 12:44:59 - [info] Active project : test
19 Sep 12:44:59 - [info] Flows file     : /home/pi/.node-red/projects/test/test.json
19 Sep 12:44:59 - [info] Waiting for missing types to be registered:
19 Sep 12:44:59 - [info]  - sqlitedb
19 Sep 12:44:59 - [info]  - sqlite

sudo npm install sqllite3
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/sqllite3 - Not found
npm ERR! 404
npm ERR! 404  'sqllite3@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-19T10_59_38_582Z-debug.log

I solved the thirst part...it starts again!

I install the package from the os instead of via packages in nodered
i did a sudo npm remove sqllite3
and
sudo npm install sqllite

Questions

  1. In the master package.json i now have two entries for sqlite,
    is that a problem?

  2. In the project/test/package.json i have another entry with another version!
    "node-red-node-sqlite": "0.4.1",
    is that a problem?

  3. How can i use one version (general and all projects and delete the old versions?)

{
  "name": "node-red-project",
  "description": "A Node-RED Project",
  "version": "0.0.1",
  "dependencies": {
    "node-red-contrib-advanced-ping": "~1.2.0",
    "node-red-contrib-cast": "~0.2.15",
    "node-red-contrib-castv2": "~3.2.1",
    "node-red-contrib-fs-ops": "~1.5.0",
    "node-red-contrib-google-home-notify-volume-adjustable": "0.0.10",
    "node-red-contrib-ip": "~1.0.1",
    "node-red-contrib-moment": "~3.0.3",
    "node-red-contrib-nora": "0.0.34",
    "node-red-contrib-play-audio": "~2.5.0",
    "node-red-contrib-queue-gate": "~1.4.0",
    "node-red-contrib-repeat": "0.0.27",
    "node-red-contrib-simpletime": "~2.10.0",
    "node-red-contrib-sonos-plus": "~4.1.3",
    "node-red-contrib-time-switch": "~1.0.8",
    "node-red-contrib-unifi": "~0.1.15",
    "node-red-contrib-web-worldmap": "~2.5.3",
    "node-red-dashboard": "~2.23.2",
    "node-red-node-base64": "~0.2.1",
    "node-red-node-email": "~1.7.9",
    "node-red-node-ping": "~0.2.1",
    "node-red-node-pushover": "0.0.20",
    "node-red-node-rbe": "~0.2.9",
    "node-red-node-sqlite": "~0.4.3",
    "node-red-node-timeswitch": "0.0.7",
    "node-red-node-ui-list": "~0.3.1",
    "node-red-node-ui-table": "~0.3.4",
    "sqlite": "^4.0.14"
  }
}

I suggest that you manually remove this and your sqlite node and then reinstall just the node. You really don't want sqlite to be installed seperately and I'm not sure what issues that might cause you in the long term. It should be OK but who knows?

ok , it does work again.
But see my previous info, i have now two entries of sqlite in packages.json on
/home/pi/.node-red

and another version in /home/pi/.node-red/project/test

I think i only need the general one, and the latest version...

Some an idea how to solve this last part?

can i delete an entry in the package file from test so it has no declaration for sqlite and therefor uses the general declaration ?

Yes, please follow my suggestion, remove them all and reinstall just the node. Check that it doesn't error on installation. I think that the sqlite node requires a compile as it has a C/C++ library.

ok , i need some help to clean the stuff a little bit, like you said
I am not an expert, but can think off:

  1. remove the sqllite entries in all the package.json files (ok, thats easy with winscp)

2a. do a sudo npm remove sqllite
2b. do a sudo npm remove sqllite3
2c. do a sudo npm remove node-red-node-sqlite

  1. remove sqllite folders in node-modules with winscp

And then to install sqlite the right way ? with:
4. npm i --unsafe-perm node-red-node-sqlite

Is this the way to it?

Are the different versions that where listed in the packagefilest gone when i execute a sudo npm remove sqllite command ?

You don't need to mess with package.json. npm will take care of that.

Do 2a-c. Double check with 3 if you like. Then do 4.

All from the userDir folder of course (~/.node-red if using a default install).

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