Hi all, little problem here; apologies if this has been asked before (I did do a few searches).
I'm running NR in Docker on my Synology NAS since Jan with no issues.
This evening, whilst tinkering, I decided to try and install the Midnight theme which involved using the container CLI to install the theme:
and an edit of the settings.js -
I must have made a mistake on the settings.js element (syntax probably) and now NodeRed refuses to start as Docker goes into a constant re-boot cycle.
I didn't properly map the volume over (Really wish I had now) so no access to the settings file.
Docker won't run the container for more than a second before restarting is.
Any idea's how I can get in to repair the damage to the settings'js file?
Failed at the firstname.lastname@example.org start script.
This is probably not a problem with npm. There is likely additional logging output above.
More log stuff:
Error loading settings file: /data/settings.js
SyntaxError: Unexpected identifier
Can you access the container via the docker cli ?
cp the settings file in & out.
This might get you on the right track
Hi, thanks for responding.
Since posting this I've tried to create a new container using the original image and an alternative image, all three containers cycle loop....?
Could there be a problem with Docker's npm?
Could the installation of midnight-red have changed something it should not/.
npm install @node-red-contrib-themes/midnight-red is the command I gave, then made the change to settings.js.
It's entirely possible I made a mistake with the my original container settings.js, but that does not really explain why a new docker container from two different images also fail to run...?
The theme installation using
npm only adds a CSS file under
node_modules so the issue must be with the
settings.js. I would try search if it's possible to mount a Docker volume to a container from another container. Perhaps this way you could create for example a plain Linux container to access the file for editing?
Thanks for responding.
I think you are right, I must have made a mistake with the syntax even though I was only copying from the guide.
Since then i've tried all ways to get into the container to repair the damage but it's proved impossible so I've deleted it and started again, only problem now is that I can't get NR to talk to Home Assistant using the Long token; tried all ways but it refused to talk.....
Seems my desire to have a dark theme really did screw this up good and proper. Might now look for a less volatile way to automate with fewer trip-wires since this has been a nasty shock...
Hi, thanks for responding.
I've given up trying to get into the container. Spent about 4 hours last night trying...
As mentioned, the settings js file seems such a fragile failure point in a docker environment despite the number of enticing settings and tweaking it contains. It's a little too unforgiving when there is a mistake in the syntax
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.