Closed alexpi closed 11 months ago
I get the same error. I made a pull request for this: #25
Let me know if it fixes it for you please.
@VojtaStruhar Sorry, I can't test your fix, I ended up using Sanity's official JS client instead of astro-sanity.
Hi there! How can I implement the fix? I was hoping to use astro-sanity
Hi. You could download my fork that has the fix (see the pull request), run npm build
and then link astro-sanity manually. But this only works on your machine, if you are using cloud build (like with how Vercel pulls projects from github), this will still fail.
Since the owner doesn't seem to maintain this repo very much, I'd say don't use astro-sanity. Their official astro app template doesn't use it either. If you look at the source code, it's mostly a thin wrapper over the sanity
package.
Thank you Vojtech, do you mean that I should click into the #25 pull request, then "check out" with GitHub CLI (ommand gh pr checkout 25)? If so, should I be in the root folder of the project? Thank you for your help.
@jaydanurwin would be nice to see PR #25 merged 😉
Sorry for the delay @grojas2525
Thank you Vojtech, do you mean that I should click into the #25 pull request, then "check out" with GitHub CLI (ommand gh pr checkout 25)? If so, should I be in the root folder of the project? Thank you for your help.
Yeah, clone the repo on my account, run npm build and then instead of npm installing astro-sanity
as you would, you link the cloned and built package instead.
As I said, this will not work if you are building in a cloud (like Vercel does). But if you do your build on your machine, you can do npm build
on your astro website and then upload the built result yourself.. Astro is just awesome like that :)
@jaydanurwin would be nice to see this one merged
Thanks for the ping @Haiko-E! I just merged it but I did want to send out a friendly reminder that this package has been deprecated in favor of the official Astro integration from Sanity. Best of luck to you and what you're building!
Thx for the merge. I didn't know there was a official astro-sanity plugin, so thx for the heads-up. Gonna check it out.
Kind regards Haiko
Op do 5 okt. 2023 16:25 schreef Jaydan Urwin @.***>:
Thanks for the ping @Haiko-E https://github.com/Haiko-E! I just merged it but I did want to send out a friendly reminder that this package has been deprecated in favor of the official Astro integration from Sanity. Best of luck to you and what you're building!
https://www.sanity.io/plugins/sanity-astro
— Reply to this email directly, view it on GitHub https://github.com/littlesticks/astro-sanity/issues/24#issuecomment-1749018566, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATI3QEX3MRL5NJCUYLMBZWTX527PNAVCNFSM6AAAAAAY4EVOQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBZGAYTQNJWGY . You are receiving this because you were mentioned.Message ID: @.***>
Hello. I am getting an "The default export of @sanity/client has been deprecated. Use the named export
createClient
instead" warning after starting my app. Is this an update that needs to be done on your part?