I realise this hsa been asked a few times, but I can't see an answer.
This is a website which was originally built in J3 and is now being migrated to J4
The template is Helix Ultimate which has been updated to the latest version 2.0.15
There are other extensions installed including Regular Labs modules anywhere.
The problem however does seem to be isolated to the Helix Ultimate template. If I change template, the error goes away.
With the help of debug I can see that the issue arrises when jQuery is loaded