Can you show a pic of the page, where you have implemented this code?
-Did you place it on your frontend?
-Did you place it on a public-js-file?
-Did you place it on backend?
Where did you place the shonw code?
In your ERROR-LOG there you can find → in 'public /pages/ln2ld.js’ ← ???
Where did you place it one more time?
Where it normaly should be placed? → on backend, right? → RIGHT !