Cant install sqlite node in node-red addon (Home Assistant)

I am trying to install sqlite node in node-red and I am unable to do so. I get the following error log. I have reviewed some other posts speaking of the same issue but non of them seems to be on the node red add on which is what i use in home assistant.
I have tried the solution proposed elsewhere which is to run npm rebuild sqlite3 but that hasn't helped.

Version of node red : v 1.3.3
OS : Debian
Home assistant add on node red version: 9.0.0


-----------------------------------------------------------
2021-04-22T07:44:23.713Z Install : node-red-node-sqlite 0.6.0

2021-04-22T07:44:22.982Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-sqlite@0.6.0
2021-04-22T07:44:29.494Z [err] npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
2021-04-22T07:44:34.544Z [out] 
2021-04-22T07:44:34.544Z [out] > sqlite3@4.2.0 install /config/node-red/node_modules/sqlite3
2021-04-22T07:44:34.544Z [out] > node-pre-gyp install --fallback-to-build
2021-04-22T07:44:34.544Z [out] 
2021-04-22T07:44:36.136Z [err] node-pre-gyp
2021-04-22T07:44:36.137Z [err]  WARN Using request for node-pre-gyp https download 
2021-04-22T07:44:37.177Z [err] node-pre-gyp
2021-04-22T07:44:37.178Z [err]  WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz 
2021-04-22T07:44:37.178Z [err] node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@14.16.1 (node-v83 ABI, musl) (falling back to source compile with node-gyp)
2021-04-22T07:44:37.178Z [err]  
2021-04-22T07:44:41.180Z [err] gyp
2021-04-22T07:44:41.181Z [err]  ERR! build error 
2021-04-22T07:44:41.182Z [err] gyp ERR!
2021-04-22T07:44:41.182Z [err]  stack Error: not found: make
2021-04-22T07:44:41.182Z [err] gyp ERR! stack
2021-04-22T07:44:41.182Z [err]      at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-04-22T07:44:41.182Z [err] gyp ERR! stack
2021-04-22T07:44:41.182Z [err]      at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-04-22T07:44:41.182Z [err] gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-04-22T07:44:41.182Z [err] gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-04-22T07:44:41.182Z [err] gyp
2021-04-22T07:44:41.182Z [err]  ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-04-22T07:44:41.182Z [err] gyp 
2021-04-22T07:44:41.182Z [err] ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-04-22T07:44:41.182Z [err] gyp ERR! stack
2021-04-22T07:44:41.182Z [err]      at FSReqCallback.oncomplete (fs.js:183:21)
2021-04-22T07:44:41.183Z [err] gyp ERR! System Linux 4.19.0-16-amd64
2021-04-22T07:44:41.183Z [err] gyp ERR! 
2021-04-22T07:44:41.183Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
2021-04-22T07:44:41.183Z [err] gyp ERR! cwd /config/node-red/node_modules/sqlite3
2021-04-22T07:44:41.183Z [err] gyp ERR! node -v v14.16.1
2021-04-22T07:44:41.183Z [err] gyp ERR! node-gyp -v v5.1.0
2021-04-22T07:44:41.183Z [err] gyp ERR! not ok 
2021-04-22T07:44:41.187Z [err] node-pre-gyp
2021-04-22T07:44:41.187Z [err]  ERR! build error 
2021-04-22T07:44:41.188Z [err] node-pre-gyp 
2021-04-22T07:44:41.188Z [err] ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
2021-04-22T07:44:41.188Z [err] node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/config/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2021-04-22T07:44:41.188Z [err] node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
2021-04-22T07:44:41.188Z [err] node-pre-gyp ERR! stack
2021-04-22T07:44:41.188Z [err]      at maybeClose (internal/child_process.js:1048:16)
2021-04-22T07:44:41.188Z [err] node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
2021-04-22T07:44:41.188Z [err] node-pre-gyp
2021-04-22T07:44:41.189Z [err]  ERR! System Linux 4.19.0-16-amd64
2021-04-22T07:44:41.189Z [err] node-pre-gyp ERR! command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2021-04-22T07:44:41.189Z [err] node-pre-gyp
2021-04-22T07:44:41.189Z [err]  ERR! cwd /config/node-red/node_modules/sqlite3
2021-04-22T07:44:41.189Z [err] node-pre-gyp ERR! node -v
2021-04-22T07:44:41.189Z [err]  v14.16.1
2021-04-22T07:44:41.189Z [err] node-pre-gyp ERR! node-pre-gyp -v v0.11.0
2021-04-22T07:44:41.189Z [err] node-pre-gyp ERR! not ok 
2021-04-22T07:44:41.190Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
2021-04-22T07:44:41.678Z [err] npm ERR! 
2021-04-22T07:44:41.678Z [err] code ELIFECYCLE
2021-04-22T07:44:41.678Z [err] npm ERR! errno
2021-04-22T07:44:41.679Z [err]  1
2021-04-22T07:44:41.689Z [err] npm ERR!
2021-04-22T07:44:41.689Z [err]  sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build`
2021-04-22T07:44:41.689Z [err] npm ERR! Exit status 1
2021-04-22T07:44:41.689Z [err] npm ERR! 
2021-04-22T07:44:41.690Z [err] npm ERR! Failed at the sqlite3@4.2.0 install script.
2021-04-22T07:44:41.690Z [err] npm
2021-04-22T07:44:41.690Z [err]  ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-04-22T07:44:41.761Z [err] 
2021-04-22T07:44:41.761Z [err] npm ERR! A complete log of this run can be found in:
2021-04-22T07:44:41.761Z [err] npm ERR!     /root/.npm/_logs/2021-04-22T07_44_41_696Z-debug.log
2021-04-22T07:44:41.774Z rc=1

You'll have to ask the Home Assistant folks how you install the build tools into the Node-RED container they provide.

As the error points out the native build tools are missing e.g. make

4-22T07:44:41.182Z [err] gyp ERR!
2021-04-22T07:44:41.182Z [err]  stack Error: not found: make

oh ok, thanks @hardillb , will do

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