Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: missing ) after argument list @ notes.js:1:45020 with v5.1.0 #3659

Closed
Lucas-C opened this issue Jul 21, 2024 · 7 comments

Comments

@Lucas-C
Copy link

Lucas-C commented Jul 21, 2024

Hi 🙂

I just want to report an issue that I have when launching the latest release of reveal.js (5.1.0).

I'm using Firefox 127.0.2 but also reproduced the same issue with Chrome 126.0.6478.183

When launching the demo page, I get a blank white screen and this error in the console:

Uncaught SyntaxError: missing ) after argument list
[notes.js:1:45020](http://localhost:5500/plugin/notes/notes.js)
Uncaught ReferenceError: RevealNotes is not defined
    <anonymous> http://localhost:5500/index2.html:36

Capture d'écran 2024-07-21 115822

The interesting thing is that I tried to pinpoint the origin of this error by prettifying plugin/notes/notes.js using beautifier.io, and when putting the prettified code in plugin/notes/notes.js this error disappear, and Reveal.js launches properly!

@MartenBE
Copy link

MartenBE commented Sep 2, 2024

I'm also experiencing this when using livereload. Exact same error.

@hakimel
Copy link
Owner

hakimel commented Sep 3, 2024

I tried running the demo.html presentation from 5.1.0 in both Chrome and Firefox but haven't been able to reproduce this yet. Also tried triggering a few livereloads. If you have any other info to share about when this error happens I'd appreciate it.

@Lucas-C
Copy link
Author

Lucas-C commented Sep 3, 2024

This is really strange...
The problem seems to come from this un-minified line: https://github.com/hakimel/reveal.js/blob/master/plugin/notes/plugin.js#L34

Specifically, based on my tests, the error disappear when removing the <head>...</head> portion of the speakerViewHTML.
And even just having <head></head> is enough to trigger the error.

@Lucas-C
Copy link
Author

Lucas-C commented Sep 3, 2024

I figured it out!

In my case, this was due to my use of Python livereload, that performs </head> tag replacement "on-the-fly":
https://github.com/lepture/python-livereload/blob/master/livereload/server.py#L40

@MartenBE
Copy link

MartenBE commented Sep 3, 2024

Python-livereload was the package I was using also, good catch @Lucas-C !

@hakimel
Copy link
Owner

hakimel commented Sep 4, 2024

Thank you for tracking this down @Lucas-C!

Let me know if any changes are needed to make this work on the reveal.js end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants