NuxtN
Nuxt15mo ago
5 replies
plcdnl

useSanity() does not work on netlify

Has anyone received the same error? I can't get it to work in any way. On Vercel everything works correctly

Nov 5, 03:37:50 PM: 99ebab92 ERROR [nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'sanity')Nov 5, 03:37:50 PM: 99ebab92 ERROR FetchError: [POST] "/api/data?key=home": 500
at async $fetch22 (file:///var/task/server.mjs:59326:16)
... 4 lines matching cause stack trace ...
at async file:///var/task/server.mjs:53768:30 {
cause: FetchError2: [POST] "/api/data?key=home": 500
at async $fetch22 (file:///var/task/server.mjs:59326:16)

i'm sure that this crash when i call the method useSanity() on server function
Screenshot_2024-11-05_alle_15.41.51.png
Was this page helpful?