Uncaught SyntaxError: expected expression, got '<'HYPE-768.full.min.js:1:1

Hey All! Am totally stumped on this one.

I have a very simple hype file on this page inserted with the Hype Wordpress plugin: https://suborbitalmachine.com/

Everything's set up right, the file tests fine in Reflect and renders properly when I preview it in the browser via Hype. When inserted into the site though, no dice and for some reason, I am getting this error in the webdev console:

Uncaught SyntaxError: expected expression, got '<'HYPE-768.full.min.js:1:1

I also tested an older file that I already had set up in another site, inserted with code and it's now the same deal, whereas previously it used to work fine on mobile.

The strangest bit is that both files appear fine when I am logged into the WP sites but if I am logged out (tested in a private window, mobile etc.), the issue appears.

Anyone ever experienced this?

Cheers,

Gerard

WP Rocket is likely causing issues -- I recommend turning off JS Concatenation or any JavaScript optimizations and testing again. It is likely delaying the loading of the required Hype runtime so your document can't display.

Usually the 'admin' doesn't have the optimizations enabled for development purposes so only 'guests' are seeing the issue.

Maybe related: Animation displaying to logged in user only - #3 by enoos

1 Like

:roll_eyes: DOH! Checked everything except that! Great catch Daniel, turned Rocket off on the page and bingo!

Many thanks.

g

2 Likes