🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Trouble setting up Sanity with Next.js app

1 replies
Last updated: May 22, 2023
Hello, been trying to setup Sanity with a nextjs app but having 0 luck. I am basically doing
npx create-next-app
with it's default structure. Here I can connect just fine to my Sanity dataset (through these steps: https://www.sanity.io/docs/connect-your-content-to-next-js ). Now I want to have Studio running seperately, so I run
pnpm create sanity@latest
and run through the questions (I basically want it to run studio alongside my dev build, not embedded, so I say no to adding the config in nextjs) but everything I try always ends up in error, I'm currently plagued by:
[plugin:vite:css] [postcss] Cannot read properties of undefined (reading 'config')
when going to localhost:3333.
May 21, 2023, 7:44 PM
Can you share your code?
May 22, 2023, 5:01 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?