Create a database in nodered (bosch ctrlx core)

Hello, as i wrote in the title i need a database for my nodered application, my problem is that i'm using nodered on a particular offline machine in which i can't install others program except nodered so i can't use an external database to connect my nodered to... for my purpose i wanted to use node-red-node-sqlite which i think would be perfect for my situation but unfotunatly the installation doesn't work, is there any plugin alternative which have both the creation of the database and access to it?

Before looking for alternatives, why not share the details of why installation doesnt work? Perhaps it is something simple we can help you with.

Share any errors you get and share the details of your installation (e.g. hardware, OS, installed in docker or OS?, node version, node-red version)

Thanks you for your answer, this is the log of the installation :

2024-03-06T08:47:44.800Z Install : node-red-node-sqlite 1.1.0

2024-03-06T08:47:44.081Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-sqlite@1.1.0
2024-03-06T08:47:46.197Z [err] npm
2024-03-06T08:47:46.203Z [err]  WARN config production Use `--omit=dev` instead.
2024-03-06T08:47:47.581Z [err] (node:2566) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
2024-03-06T08:47:47.581Z [err] (Use `node --trace-warnings ...` to show where the warning was created)
2024-03-06T08:47:54.508Z [err] npm
2024-03-06T08:47:54.509Z [err]  
2024-03-06T08:47:54.510Z [err] WARN
2024-03-06T08:47:54.511Z [err]  
2024-03-06T08:47:54.511Z [err] tar
2024-03-06T08:47:54.513Z [err]  TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.528Z [err] npm WARN 
2024-03-06T08:47:54.528Z [err] tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.541Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.545Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.548Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.557Z [err] npm WARN
2024-03-06T08:47:54.558Z [err]  tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.566Z [err] npm 
2024-03-06T08:47:54.566Z [err] WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.572Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.578Z [err] npm
2024-03-06T08:47:54.578Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.589Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.596Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.615Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.618Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.626Z [err] npm
2024-03-06T08:47:54.626Z [err]  
2024-03-06T08:47:54.628Z [err] WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.638Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.645Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.645Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.655Z [err] npm
2024-03-06T08:47:54.658Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.669Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.687Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.696Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.718Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.729Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.743Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.753Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.761Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.767Z [err] npm
2024-03-06T08:47:54.768Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.771Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.776Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.787Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.789Z [err] npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
2024-03-06T08:47:54.802Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.827Z [err] npm
2024-03-06T08:47:54.827Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.863Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.863Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.869Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.878Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.893Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.896Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.908Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.911Z [err] npm WARN
2024-03-06T08:47:54.911Z [err]  tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.920Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.935Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.948Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.955Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.959Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.963Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.966Z [err] npm
2024-03-06T08:47:54.966Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.975Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.979Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.993Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:54.999Z [err] npm
2024-03-06T08:47:54.999Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.011Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.019Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.032Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.043Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.047Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.059Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.073Z [err] npm
2024-03-06T08:47:55.073Z [err]  WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.083Z [err] npm WARN
2024-03-06T08:47:55.085Z [err]  tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.094Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.121Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.135Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.142Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.145Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.160Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.168Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.177Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.188Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.202Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.209Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.215Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.225Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.228Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.233Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.248Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.259Z [err] npm WARN
2024-03-06T08:47:55.260Z [err]  tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.273Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.276Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.281Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.295Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.316Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.346Z [err] npm WARN
2024-03-06T08:47:55.346Z [err]  tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.356Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.366Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:47:55.378Z [err] npm WARN tar TAR_ENTRY_ERROR EPERM: operation not permitted, fchown
2024-03-06T08:48:00.722Z [err] npm ERR! code 1
2024-03-06T08:48:00.722Z [err] npm ERR!
2024-03-06T08:48:00.722Z [err]  path /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/sqlite3
2024-03-06T08:48:00.729Z [err] npm
2024-03-06T08:48:00.729Z [err]  ERR! command failed
2024-03-06T08:48:00.730Z [err] npm ERR! command sh -c prebuild-install -r napi || node-gyp rebuild
2024-03-06T08:48:00.730Z [err] npm 
2024-03-06T08:48:00.730Z [err] ERR! prebuild-install warn install EPERM: operation not permitted, lchown '/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/sqlite3/build/Release'
2024-03-06T08:48:00.730Z [err] npm 
2024-03-06T08:48:00.731Z [err] ERR! gyp info it worked if it ends with ok
2024-03-06T08:48:00.731Z [err] npm ERR! gyp info using node-gyp@8.4.1
2024-03-06T08:48:00.731Z [err] npm 
2024-03-06T08:48:00.732Z [err] ERR! gyp info using node@18.15.0 | linux | x64
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn /usr/bin/python3
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args [
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/node-gyp/gyp/gyp_main.py',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   'binding.gyp',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '-f',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   'make',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '-I',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/sqlite3/build/config.gypi',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '-I',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/node-gyp/addon.gypi',
2024-03-06T08:48:00.732Z [err] npm ERR! gyp info spawn args   '-I',
2024-03-06T08:48:00.732Z [err] npm ERR!
2024-03-06T08:48:00.734Z [err]  gyp info spawn args   '/root/snap/ctrlx-node-red/732/.cache/node-gyp/18.15.0/include/node/common.gypi',
2024-03-06T08:48:00.734Z [err] npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
2024-03-06T08:48:00.734Z [err] npm ERR! gyp info spawn args   '-Dvisibility=default',
2024-03-06T08:48:00.734Z [err] npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/snap/ctrlx-node-red/732/.cache/node-gyp/18.15.0',
2024-03-06T08:48:00.734Z [err] npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/node-gyp',
2024-03-06T08:48:00.734Z [err] npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/snap/ctrlx-node-red/732/.cache/node-gyp/18.15.0/<(target_arch)/node.lib',
2024-03-06T08:48:00.734Z [err] npm
2024-03-06T08:48:00.735Z [err]  ERR! gyp info spawn args   '-Dmodule_root_dir=/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/sqlite3',
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args   '-Dnode_engine=v8',
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args   '--depth=.',
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args   '--no-parallel',
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args   '--generator-output',
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args   'build',
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args   '-Goutput_dir=.'
2024-03-06T08:48:00.735Z [err] npm ERR! gyp info spawn args ]
2024-03-06T08:48:00.735Z [err] npm ERR! gyp ERR! build error 
2024-03-06T08:48:00.735Z [err] npm ERR! gyp ERR! stack Error: not found: make
2024-03-06T08:48:00.735Z [err] npm ERR! gyp ERR! stack     at getNotFoundError (/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/which/which.js:10:17)
2024-03-06T08:48:00.735Z [err] npm ERR! gyp ERR! stack     at /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/which/which.js:57:18
2024-03-06T08:48:00.735Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
2024-03-06T08:48:00.735Z [err] npm ERR!
2024-03-06T08:48:00.737Z [err]  gyp ERR! stack     at step (/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/which/which.js:54:21)
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! stack     at /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/which/which.js:71:22
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! stack     at subStep (/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/which/which.js:69:33)
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! stack     at /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/which/which.js:80:22
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! stack     at /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/isexe/index.js:42:5
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! stack     at /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/isexe/mode.js:8:5
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! System Linux 5.10.153-rt76-arch02-16
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! command "/snap/ctrlx-node-red/732/bin/node" "/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/.bin/node-gyp" "rebuild"
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! cwd /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/node-RED/node_modules/sqlite3
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! node -v v18.15.0
2024-03-06T08:48:00.737Z [err] npm ERR! gyp ERR! node-gyp -v v8.4.1
2024-03-06T08:48:00.737Z [err] npm
2024-03-06T08:48:00.738Z [err]  ERR! gyp ERR! not ok
2024-03-06T08:48:00.758Z [err] 
2024-03-06T08:48:00.758Z [err] npm ERR! A complete log of this run can be found in:
2024-03-06T08:48:00.759Z [err] npm ERR!     /root/snap/ctrlx-node-red/732/.npm/_logs/2024-03-06T08_47_46_055Z-debug-0.log
2024-03-06T08:48:00.837Z rc=1

Is that a Windows machine?

What features of a database do you need?

When NPM is trying to install something, it is using tar in the background. What is happening is that it is failing to be able to change ownership of files/folders to the user running the install.

You would need to look at how/where you have installed Node-RED. For example, a common problem is to install Node-RED as root user but run it as some other user.

and this :point_up_2:


Luckily, I recognise some of the stuff from your log - it is a Bosch CtrlX device (not sure if it is core hardware or software though)

You will need to contact bosch support forums or their tech support I'm afraid.

Perhaps updating your thread title to indicate this might attract the right users (not sure how many Bosch CtrlX users there are on this forum)

It is a bosch ctrlx core, i just need really basic features, basically just insert,delete and select from where ex...

yeah, it is a core hardware device, i guess i'll try to contact them and write on the other forum, thanks anyway for the answer

Maybe persistent context could give you a very simple emulation of a single db table.
Obviously it would need to be more complicated than this to be useful ...

let mydata = context.get('mydata') || {}

if (msg.topic == "insert") {
    mydata[msg.key] = msg.payload
}

if (msg.topic == "delete") {
    delete mydata[msg.key]
}

if (msg.topic == "select") {
    msg.payload = mydata[msg.key]
}

context.set('mydata', mydata)
return msg;
1 Like

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