ether / etherpad-lite

Etherpad: A modern really-real-time collaborative document editor.
http://docs.etherpad.org/
Apache License 2.0
16.53k stars 2.84k forks source link

console error: "Uncaught ReferenceError: require is not defined" #5041

Closed risacher closed 3 years ago

risacher commented 3 years ago

When loading a pad in 1.8.13, I get an error in the Chrome console: "ace2_common.js?callback=require.define&v=17d4f570:1 Uncaught ReferenceError: require is not defined at ace2_common.js?callback=require.define&v=17d4f570:1"

Also sometimes: "ace2_inner.js?callback=require.define&v=17d4f570:1 Uncaught ReferenceError: require is not defined at ace2_inner.js?callback=require.define&v=17d4f570:1"

Everything seems to work, as far as I can see. It's not a big deal, but seems a bit worrisome.

Server (please complete the following information):

Desktop (please complete the following information):

webzwo0i commented 3 years ago

I see this too. It's probably a race after https://github.com/ether/etherpad-lite/blob/develop/src/static/js/ace.js#L266, so the fetched resource for ace2_inner/ace2_common is executed before the require-kernel is executed.

It should not cause any harm, just a little slow down. Parent issue for reworking this area is https://github.com/ether/etherpad-lite/issues/4820

risacher commented 3 years ago

Thanks for the analysis, @webzwo0i. It didn't seem to affect anything important. At least now the diagnosis is documented as a (closed) issue.

q2apro commented 9 months ago

Hello from 2024. I ran into the same error message, using Etherpad docker.

Still not resolved?

risacher commented 9 months ago

For what it's worth, I don't see this in my recent installs (and I have re-installed recently) so I suspect it's a transient problem.

q2apro commented 9 months ago

Are you using Docker? ... The approach of "I don't have the problem." does not help.

risacher commented 8 months ago

Yeh, sorry. My experience may not be relevant. I do not currently use docker for Etherpad. (Although I do use it for Wordpress, Wekan, Gitea, & Owncloud.)