-
Notifications
You must be signed in to change notification settings - Fork 252
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
Setting up repl - "Uncaught Error: No CodeMirror editor found" with Vite + React #559
Comments
I ran into the same issue. This worked for me (I was on 4.23.10):
Not ideal of course :) Debugging notes: I tried running the example from the pglite-repl repository and it worked, so I tried to see what was different in my setup and noticed the different lib version. This PR seems to have introduced the changes: https://github.com/uiwjs/react-codemirror/pull/717/files I haven't figured out how this executes exactly and why |
Thank you for the fix and insights, it works! Glad it wasn't just me 😄 |
@ldirer thank you for pointing this out! |
@copiltembel whilst the issue was introduced with Either a permanent fix on the code mirror side (I don't know if they identify there's a problem), or at least documentation update on the PGlite side to clarify the workaround What do you think? |
Yes, at the very least we should document this. |
I've looked a little more at I'm not sure where the issue is occurring yet... but I suspect there's some odd timing issue. Perhaps The fix that the codemirror team put in place was to remove redundant re-rendering... I suspect the REPL component was taking advantage of that before? I also see some setTimeout's being used in the repl component... are these a workaround? |
Hello,
No doubt I'm doing something stupid. I was following the guide here to setup the repl component but I keep getting an error in the console:
Looks like this is intentionally thrown when it can't be found, but I'm not sure why this would be.
Here's an example on a branch here (just run
npm i && npm run dev
to run).PGlite is otherwise working for me.
Any ideas?
Thanks!
The text was updated successfully, but these errors were encountered: