Unexpected identifier `#...` SyntaxError

AI-generated summary

A user, Krystian_Wojciechowski, is experiencing a SyntaxError: Unexpected identifier in their Discourse community, which appears after setting up a theme and installing the discourse-rss-polling plugin. The error occurs in the browser console and persists even in safe mode, across browsers like Chrome 123 and Safari 17. David suggests the issue may be caused by Cloudflare’s optimization tools, specifically

Im testing a Discourse as a community solution.
After setting up simple theme - just colors + fonts
and installed plugin GitHub - discourse/discourse-rss-polling · GitHub
created some categories and topics - this error blew up.

vendor.ff29780b9fed784cce2d843dcb93a803-608f4f77d8437d715d8d39c739c0c8bbe0fe51c9305e55f1ec7d0bee19f5571f.js:9 Uncaught (in promise) Error: There is no route named admin

after entering safe-mode everything looks same and same errors pop up.
Tried different browsers. Also tried ./launcher rebuild app, also removed plugins app.yml and dictionary.

Which browser/version have you tried?

Would you mind posting a link to your site?

https://community.samana-group.net

I tried both Brave and Safari

Can you check the Brave and Safari versions? If you’re not sure, take a look at https://www.whatsmybrowser.org/

Chrome 123.

Safari 17.

I suspect that Cloudflare’s “optimization” tools are breaking Discourse’s Javascript code. Please can you check that “Rocket Loader” is turned off in your cloudflare config.

More info on Cloudflare best practices here.

Also please make sure you have “Auto Minify” disabled. It looks like Cloudflare have deprecated this feature because of incompatibility with recent javascript features:

Looks like you will need to purge your cache after doing that.