-
Notifications
You must be signed in to change notification settings - Fork 20
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
2.7.0 breaks Astro visual editing support #2150
Comments
Facing the similar kind of issue. After doing some research i found some solution related lodash package, so in vite config i added this in astro.config file This solved my issue my visual-editing-component (overlays) worked fine but in studio i faced different issue which is Then in presentation tool, it shows this |
@maazuddindenovers I have the exact same problem with the visual editor where the first edit just works and shows. When making a second edit, it just crashes. This is not only on 2.7.0 version but also on older versions like 2.4.1 etc... |
@DavithkbY , Yeah, i have also tried multiple older version, but there are still some kind of errors, Not sure I think these issues are causing with some dependents/dependencies and someone also look into this package also is this related to this package @sanity/astro or not. |
I think this issue is likely related to |
Hi @rdunk do you mean 2.7.1? With version 2.7.1 it's still broken: My package.json:
|
@rdunk I tried it again and it does seem fixed now with 2.7.1 amazing! |
@DavithkbY Awesome! Glad to hear it and thanks for reporting. |
@rdunk it randomly stopped working locally again. Nothing changes in the codebase literally 0 lines of code very weird.
|
Just possibly another clue turns up.
Now. I tried this out. App -- fine. Studio on /admin -- looked fine at first. But, it failed to Live Edit actually, and after a while gave the prompt you've seen that it couldn't connect, which is studio to app. In the console.log, this is logged, along eventually with the usual heartbeat no response. But: there is something else, seemingly taking a while to show up: an Uncaught Error: path is required....and this having to do with ResolveEditInfo, which I seem to find inside the visual-editing package code. This looks like a bit of a hot clue, and you can see it all on the screenshot I'm attaching. Hope it helps. Once again, this occurs on Vercel, but not on dev, and with the environmental config look like it is correct. The console indication is something missing, not mis-set.... The repo for this, if useful, is https://github.com/narration-sd/sanity-astro/tree/narration-sd/added-blog-example-vercel |
@DavithkbY I was facing this issue, so i looked into it
I found that in nodemoules at this path but in lodash package So i found out that i can use the "lodash-es" for ES module so i installed and then configured vite in astro config
but not sure, it is the right solution or not but @rdunk can tell more on this. |
@maazuddindenovers Maaz, I'm suspecting your lodash situation has been something to do with your app, rather than this sanity-astro issue. I see no such errors, but put in your alias to lodash-es, which seems accepted (as long as I add it to pnpm), but makes no changes I can see to the no-visual-editing problem -- but was a good thought :) I pushed further on what appears here, by creating a Netlify-compatible config, and deploying on Netlify. This fails to visual edit also, just as we've been seeing, and has the same logging of 'uncaught Error: path is required'. The image is this time is from Chrome latest, instead of Firefox latest, but the result is the same, as you can see below.
Ok. I have to leave it, hopefully with more clues. The Netlify version including trial steps today is here. |
The visual editor is broken in Astro with 2.7.0 and also 2.6.0:
The text was updated successfully, but these errors were encountered: