Pretty sure I could repeat the error - I spent about 2 hours yesterday trying to sort out the Syntax Errors I was getting.
ChatGPT mentioned that there should be Semi-Colons or New Lines in the ‘bad’ Javascript and all the errors I saw in the .js files were merged lines with no Semi-Colons.
At the moment, I am spending my efforts on getting the SPA correct. I now know this problem exists and I have a workaround.
However… Out of curiosity I have just tried the same actions as yesterday on the same Nodes as yesterday and it all works OK! I did try restarting Vivaldi yesterday, that made no difference, but I didn’t do a reboot. Maybe I was just unlucky, but I will keep my eye on it now I know about it!!