When i place the npm packages in node-red after that it gives a bad gateway 502
What can i do to fix it because i need the npm packages for node-red configuration in a template for my heat pump
When i place the npm packages in node-red after that it gives a bad gateway 502
What can i do to fix it because i need the npm packages for node-red configuration in a template for my heat pump
I haven’t used NodeRed as Addon for some time now, since I’m running a dedicated NodeRed instance… but when I used NodeRed, the only thing I had to do was to add the npm package to the Addon Configuration… I can’t remember that I had to do anything within the SSH (but that might have changed in the meantime)…
Gateway 502 error is usually an indicator, that the Application could not start.
You should check the Logs of the Addon and probably, there are some hints what went wrong
Thanks CChris, I have checked the Logs:
start
node $NODE_OPTIONS node_modules/node-red/red.js --settings /etc/node-red/config.js
Error loading settings file: /etc/node-red/config.js
/config/node-red/settings.js:196
default: “memoryOnly”,
^^^^^^^
SyntaxError: Unexpected token ‘default’
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/etc/node-red/config.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
[17:18:47] INFO: Service Node-RED exited with code 0 (by signal 0)
[17:18:49] INFO: Starting Node-RED…
it seems to be the config "contextStorage: { default: “memoryOnly”… "
which is causing the issue.
As mentioned, I can’t remember that I had to add this to the configuration when I used NodeRed as Addon… but this might have changed since then (?)
It could be, that the spacing in your configuration is not correct (as mentioned in the screenshot)…
But aside of that, unfortunately, there’s not much I can support atm… maybe someone else has an idea who actually runs NodeRed as an Addon?