I'm running node-red on SIEMENS iot2050.
Node-red version: v1.2.7
Node.js version: v10.15.2
Linux 4.19.59+ arm64 LE
Everything was ok as soon as I installed a node, with: npm install node-red-node-sqlite in /usr/lib/node_modules folder.
After that node red wasn't active... also after a reboot.
I re-installed node red (loosing everything I did ...)... and now I can't ave node red active on startup.
If I start manually it's ok.
If I run sudo systemctl statu node-red, I get this answer:
I think it is possible to fix, but I can't figure out how to do!
In a terminal, stop node red then star it again and you should see the startup log which should give more information. Don't start it using systemd but manually in a terminal. I don't know how you run node-red on that system but possibly the command node-red will do it.
If possible please copy/paste the log rather than screenshot.
[Edit] Reinstalling node-red should not have deleted your flows file, it is probably just that the reinstalled system is looking in a different place. It may be useful to tell us how you installed it and how you did it the first time.
I would say that the sqlite install failed. You might want to remove it then install manually from the userDir folder so that you can see exactly what happens - you can do the same from the palette manager by clicking the view log button.
Is node red installed into /use/lib/node_modules? If so then I suggest that you delete that whole folder and start again. I don't know the recommended way to install node red on that device though. The fact it didn't find your flows file, wherever that is, suggests that you have installed it in a different manner to the original install.
You have installed things as root globally so things are in the wrong place.
As others have said, the thing to do at this point is to take a deep breath, make a copy of your flows, credentials, etc. and start again from scratch.
Only node-red itself should be installed globally with sudo npm -g install node-red --production --unsafe-perm.
Check to make sure you don't have other things incorrectly installed globally with sudo npm ls --depth=0
Rename /root/.node-red to keep it safe. Do the same for whatever user you normally log in with.
Then run node-red manually to recreate the correct folder at ~/.node-red along with a new settings.js. cd to that folder and remember to always do that.
Go to the Editor for your node-red and install what you need from the palette manager not from the command line. Then you can edit your old flows file, copy the content and, in the Editor again, import from clipboard. You will possibly then need to set up some credentials for nodes that need them.
well - hopefully not - but just be careful before telling users to uninstall and reinstall as they may already be doing it right... most likely it doesn't have correct build tools or python or... something to install sqlite and build it. But yes - /usr/lib/node_modules in not the correct place to install in the first place... so some sort of back to initial state is required.
Hej guys, thanks for the information you've given me!
I'm not so expert in Debian SO, this is the reason why I was more confused rather than now.
So I think I'll recreate the SO image according to previous time I did, and as SIEMENS says.
The only thing I want to ask is: is it possible that the second installation didn't affect files of the previous? Are there any possibilities that the flows that I create with the first instance are already accessible? Where I could find them?
The flows file will be called flows_something.json. So you could search the filing system for files of that name to find where it is. Something like find / -name "flows_*.json"
That should also find the credentials file which will be called flows_something_cred.json, you need the one without the _cred.
[Edit] Actually better to use this, which will also find the flow backup files find / -name "*flows_*.json*"