Skip to content
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

Not working with getServerSideProps #4

Open
Riley1101 opened this issue Oct 31, 2022 · 0 comments
Open

Not working with getServerSideProps #4

Riley1101 opened this issue Oct 31, 2022 · 0 comments

Comments

@Riley1101
Copy link

Riley1101 commented Oct 31, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant