-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Issue with Sanity #21
Comments
I tried and I think the issue is not caused by the intergration but i a misconfiguration of your astro project. I tried everything to make your project work locally and failed, so i started a brand new following i18n docs then sanity docs. It works perfectly fine https://github.com/florian-lefebvre/astro-i18n-sanity-test |
Hi Florian, I'm reopening this issue as I've managed to identify the cause of the problem. It appears that using I downloaded your minimal reproduction and added the On Vercel you get a status 500 when trying to access the Additionally, attempting to run npm run dev on StackBlitz throws an error: Here are the links for reference: My minimal reproduction with : https://github.com/layout-ch/astro-i18n-sanity |
I'm investigating and the issue seems unrelated to sanity. on windows i have no issue with the als but on stackblitz (linux) the als getStore is undefined |
https://stackblitz.com/edit/github-ddc8wy?file=src%2Froutes%2Findex.astro this logs |
on my mac I dont get any errors and that's what I get from the log : {
clientOptions: { data: false, translations: false, paths: false },
translations: {
initialized: false,
i18nextConfig: {
namespaces: [Array],
defaultNamespace: 'common',
resources: [Object]
}
},
data: { locale: 'en', locales: [ 'en', 'fr' ], defaultLocale: 'en' },
paths: {
pathname: '/',
routes: [ [Object], [Object] ],
dynamicParams: {},
strategy: 'prefixExceptDefault'
}
} |
I didn't update the issue but this error is stackblitz specific, I'll see about vercel tomorrow |
Hi! The integration works like a charm with Astro. Now I'm trying to do the next step which is adding a CMS so that clients can handle their multilanguage website through a Dashboard.
For this I'm trying out Sanity with has a super generous free tier. I did a small repro here with astrolicious-i18n: https://github.com/layout-ch/astro-sanity .
Sanity let you embed your cms on a route of your website, which I did on the
/admin
route in theastro-config
:export default defineConfig({ site: "https://test.com", output: "hybrid", adapter: vercel(), integrations: [ sanityIntegration( { projectId: "t9cmnozc", dataset: "production", useCdn: false, studioBasePath: "/admin", } ), react(), liciousI18n({ defaultLocale: "fr", locales: ["fr", "de", "en"], strategy: "prefix", sitemap: true, pages: { "a-propos": { de: "ueber-uns", en: "about-us" } } })] });
It works like intended on the dev server but when I deploy to vercel, vercel doesn't seem to like that.
I tried it out without astrolicious-i18n and it works, but once I added the integration to the project, I get a
status 500
on the/admin
route. Is this because of how astrolicious-i18n handles the routes? Since they are generated automatically on build time, it somehow overrides the /admin route that comes from the sanity integration? Any tips on how to make this work with a headless CMS would be amazing. Thank you in advance !Side note : everything works when I remove i18n so it is somehow interfering somewhere....
The text was updated successfully, but these errors were encountered: