Closed CalebKester closed 5 months ago
Try setting minimal: true
explicitly - it looks like previously you might have been relying on it falling back to minimal client as you had no @sanity/client
installed.
I added this to my package
"@sanity/client": "^6.15.7",
in my sandbox repo (it was in my main repo that has this issue) and it's still having the issue.
However minimal: true
does make it work both with the sanity client added and without it.
Thanks for the quick help!
We still need to investigate why this is failing with the sanity client. Do you have any more logs or a reproduction?
I've moved my sandbox repo over to github and you can see it here https://github.com/CalebKester/nuxt-sanity-server . You can test it with the url http://localhost:3000/api/footer and toggling minimal on and off will error it.
Same error!
same issue here
@stephanepericat as workaround you can use minimal: true
@plcdnl reverting to 1.8.3 also solves the issue
According to the error message and related files in the error stack, this is may be because, somewhere in v1.9.0 updates, SanityClient
is been wrapped by a Proxy, and in such case, SanityClient
can no longer visit its private field under the hood.
Reference: https://github.com/evanw/esbuild/issues/1969#issuecomment-1023787162
I recently updated my packages from 1.8.1 to latest and found out that in 1.9 I am unable to make calls from a file in server/api due to the following issue. Did something change on how I need to make this call from nuxt server?
Error:
File:
/server/api/footer.ts
Package.json
Nuxt Config: