You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the sanity client returned from setupNextSanity in getServerSideProps function . But it has an error saying window is not defined even thought it work very well with getStaticProps.
Also sanityStaticProps only work with getStaticProps any way I can port sanity client with getServerSideProps with this plugin ?
PS : Using edge on cloudflare
ReferenceError: window is not defined at PicoSanity.fetcher (/home/site/.vercel/output/static/_worker.js:20996:15) at PicoSanity.fetch (/home/site/.vercel/output/static/_worker.js:21035:25) at Index (/home/site/.vercel/output/static/_worker.js:15686:36) at Wc (/home/site/.vercel/output/static/_worker.js:23773:22) at Zc (/home/site/.vercel/output/static/_worker.js:23817:21) at Z (/home/site/.vercel/output/static/_worker.js:23968:19) at $c (/home/site/.vercel/output/static/_worker.js:24013:22) at bd (/home/site/.vercel/output/static/_worker.js:24004:17) at Z (/home/site/.vercel/output/static/_worker.js:23979:17) at $c (/home/site/.vercel/output/static/_worker.js:24013:22)
The text was updated successfully, but these errors were encountered:
I am trying to use the sanity client returned from setupNextSanity in
getServerSideProps
function . But it has an error saying window is not defined even thought it work very well withgetStaticProps
.Also
sanityStaticProps
only work with getStaticProps any way I can port sanity client with getServerSideProps with this plugin ?PS : Using edge on cloudflare
ReferenceError: window is not defined at PicoSanity.fetcher (/home/site/.vercel/output/static/_worker.js:20996:15) at PicoSanity.fetch (/home/site/.vercel/output/static/_worker.js:21035:25) at Index (/home/site/.vercel/output/static/_worker.js:15686:36) at Wc (/home/site/.vercel/output/static/_worker.js:23773:22) at Zc (/home/site/.vercel/output/static/_worker.js:23817:21) at Z (/home/site/.vercel/output/static/_worker.js:23968:19) at $c (/home/site/.vercel/output/static/_worker.js:24013:22) at bd (/home/site/.vercel/output/static/_worker.js:24004:17) at Z (/home/site/.vercel/output/static/_worker.js:23979:17) at $c (/home/site/.vercel/output/static/_worker.js:24013:22)
The text was updated successfully, but these errors were encountered: