Open sgriffiths opened 3 years ago
Sorry about the issue with this. An earlier version of the Starter didn't have the right env variable naming conventions for Next.js to run client side with the API. If you look at this updated .env template file and update your .env.local, it should clear things up locally:
https://github.com/sanity-io/sanity-template-nextjs-blog-comments/blob/main/template/.env.test
Could you update the starter on the website with these instructions? This problem chewed up a lot of time for me.
Im getting the following error after building and doing npm run dev:
If I return an empty object/array the page loads but there is no blog content. Perhaps there is a dependancy missing from the readme ?
Addtional notes Sanity is running fine .env.local created and 'SANITY_API_TOKEN' pointing to 'write' API token in sanity running latest npm/node and also tried with Yarn
Any help would be welcomed. The blog site is running fine on Vercel. Issue lies when trying to run this locally