I recently upgraded to node-red 3.0.2 and as such, I also upgrade node.js to version 16 and npm to version 8. a couple of my flows had errors afterwards that the sqlite was in need of attention. I tried to upgrade it via the command line and it provides lots of error and then tried from within node-red and the piece below is what is spit out. I read in the forums of a problem having both node-red-node-sqlite sqlite and node-red-node-sqlite sqlitedb installed. I uninstalled the node-red-node-sqlite sqlitedb and still can't get node-red-node-sqlite sqlite to install.
I realize there are lots of the questions about this subject, and I've tried the recommendations in the forums and they are a year or more old.
2022-12-10T00:13:01.983Z Install : node-red-node-sqlite 1.0.3
2022-12-10T00:13:02.002Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-sqlite@1.0.3
2022-12-10T00:13:04.501Z [err] npm
2022-12-10T00:13:04.505Z [err] WARN
2022-12-10T00:13:04.506Z [err] config production Use `--omit=dev` instead.
2022-12-10T00:13:18.614Z [err] npm
2022-12-10T00:13:18.615Z [err] WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
2022-12-10T00:13:24.264Z [err] npm
2022-12-10T00:13:24.265Z [err]
2022-12-10T00:13:24.265Z [err] ERR!
2022-12-10T00:13:24.265Z [err]
2022-12-10T00:13:24.266Z [err] code
2022-12-10T00:13:24.266Z [err] 1
2022-12-10T00:13:24.267Z [err] npm
2022-12-10T00:13:24.267Z [err]
2022-12-10T00:13:24.267Z [err] ERR!
2022-12-10T00:13:24.268Z [err]
2022-12-10T00:13:24.268Z [err] path
2022-12-10T00:13:24.268Z [err] /home/pi/.node-red/node_modules/sqlite3
2022-12-10T00:13:24.275Z [err] npm
2022-12-10T00:13:24.275Z [err]
2022-12-10T00:13:24.276Z [err] ERR!
2022-12-10T00:13:24.276Z [err] command failed
2022-12-10T00:13:24.277Z [err] npm
2022-12-10T00:13:24.277Z [err]
2022-12-10T00:13:24.278Z [err] ERR!
2022-12-10T00:13:24.278Z [err]
2022-12-10T00:13:24.278Z [err] command
2022-12-10T00:13:24.279Z [err] sh -c -- node-pre-gyp install --fallback-to-build
2022-12-10T00:13:24.279Z [err] npm
2022-12-10T00:13:24.280Z [err]
2022-12-10T00:13:24.280Z [err] ERR!
2022-12-10T00:13:24.280Z [err] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
2022-12-10T00:13:24.281Z [err] npm
2022-12-10T00:13:24.282Z [err]
2022-12-10T00:13:24.282Z [err] ERR!
2022-12-10T00:13:24.283Z [err] node-pre-gyp info it worked if it ends with ok
2022-12-10T00:13:24.283Z [err] npm
2022-12-10T00:13:24.283Z [err]
2022-12-10T00:13:24.284Z [err] ERR!
2022-12-10T00:13:24.284Z [err] node-pre-gyp info using node-pre-gyp@1.0.10
2022-12-10T00:13:24.284Z [err] npm
2022-12-10T00:13:24.285Z [err]
2022-12-10T00:13:24.285Z [err] ERR!
2022-12-10T00:13:24.286Z [err] node-pre-gyp info using node@16.18.1 | linux | arm
2022-12-10T00:13:24.286Z [err] npm
2022-12-10T00:13:24.287Z [err]
2022-12-10T00:13:24.287Z [err] ERR!
2022-12-10T00:13:24.287Z [err] node-pre-gyp info check checked for "/home/pi/.node-red/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-arm/node_sqlite3.node" (not found)
2022-12-10T00:13:24.288Z [err] npm
2022-12-10T00:13:24.288Z [err]
2022-12-10T00:13:24.288Z [err] ERR!
2022-12-10T00:13:24.289Z [err] node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-glibc-arm.tar.gz
2022-12-10T00:13:24.289Z [err] npm
2022-12-10T00:13:24.289Z [err]
2022-12-10T00:13:24.291Z [err] ERR!
2022-12-10T00:13:24.291Z [err] node-pre-gyp ERR! install response status 404 Not Found on https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-glibc-arm.tar.gz
2022-12-10T00:13:24.292Z [err] npm
2022-12-10T00:13:24.292Z [err]
2022-12-10T00:13:24.301Z [err] ERR! node-pre-gyp WARN Pre-built binaries not installable for sqlite3@5.1.2 and node@16.18.1 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-glibc-arm.tar.gz
2022-12-10T00:13:24.301Z [err] npm ERR! node:internal/modules/cjs/loader:988
2022-12-10T00:13:24.301Z [err] npm ERR! throw err;
2022-12-10T00:13:24.301Z [err] npm ERR! ^
2022-12-10T00:13:24.301Z [err] npm ERR!
2022-12-10T00:13:24.301Z [err] npm ERR! Error: Cannot find module 'object-assign'
2022-12-10T00:13:24.301Z [err] npm ERR! Require stack:
2022-12-10T00:13:24.301Z [err] npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js
2022-12-10T00:13:24.301Z [err] npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js
2022-12-10T00:13:24.301Z [err] npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js
2022-12-10T00:13:24.301Z [err] npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js
2022-12-10T00:13:24.301Z [err] npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
2022-12-10T00:13:24.301Z [err] npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
2022-12-10T00:13:24.301Z [err] npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
2022-12-10T00:13:24.301Z [err] npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:833:27)
2022-12-10T00:13:24.301Z [err] npm ERR! at Module.require (node:internal/modules/cjs/loader:1057:19)
2022-12-10T00:13:24.301Z [err] npm ERR! at require (node:internal/modules/cjs/helpers:103:18)
2022-12-10T00:13:24.301Z [err] npm ERR! at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js:4:20)
2022-12-10T00:13:24.301Z [err] npm ERR! at Module._compile (node:internal/modules/cjs/loader:1155:14)
2022-12-10T00:13:24.301Z [err] npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
2022-12-10T00:13:24.301Z [err] npm ERR! at Module.load (node:internal/modules/cjs/loader:1033:32)
2022-12-10T00:13:24.301Z [err] npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:868:12)
2022-12-10T00:13:24.301Z [err] npm ERR! at Module.require (node:internal/modules/cjs/loader:1057:19) {
2022-12-10T00:13:24.301Z [err] npm ERR! code: 'MODULE_NOT_FOUND',
2022-12-10T00:13:24.301Z [err] npm ERR! requireStack: [
2022-12-10T00:13:24.301Z [err] npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js',
2022-12-10T00:13:24.301Z [err] npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js',
2022-12-10T00:13:24.301Z [err] npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js',
2022-12-10T00:13:24.301Z [err] npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js',
2022-12-10T00:13:24.301Z [err] npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js',
2022-12-10T00:13:24.301Z [err] npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js'
2022-12-10T00:13:24.301Z [err] npm ERR! ]
2022-12-10T00:13:24.301Z [err] npm ERR! }
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! build error
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1100:16)
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! System Linux 5.15.76-v7l+
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/sqlite3
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! node -v v16.18.1
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
2022-12-10T00:13:24.301Z [err] npm ERR! node-pre-gyp ERR! not ok
2022-12-10T00:13:24.302Z [err]
2022-12-10T00:13:24.303Z [err] npm ERR!
2022-12-10T00:13:24.303Z [err] A complete log of this run can be found in:
2022-12-10T00:13:24.303Z [err] npm ERR! /home/pi/.npm/_logs/2022-12-10T00_13_04_331Z-debug-0.log
2022-12-10T00:13:24.342Z rc=1