sanity-io / sanity

Sanity Studio – Rapidly configure content workspaces powered by structured content
https://www.sanity.io
MIT License
5.33k stars 430 forks source link

npm run dev not working for me in sanity v3 #5373

Open Avii69 opened 11 months ago

Avii69 commented 11 months ago

I am trying sanity for the first time.

After installing all dependencies, I use npm run dev, but it's stuck on

✔ Checking configuration files...

How to debug this?

Node: 16.13.0

sanity studio v3

francislagares commented 11 months ago

Yep, I have the same issue.

But in my case I get 'TypeError: Cannot read properties of undefined (reading 'toLowerCase')' After debuggin' the file the error is thrown from 'node_modules/framer-motion/dist/cjs/index.js:4245:25)' I've found a workaround in line 4244 by adding an optional chaining after userAgent:

const userAgentContains = (string) => typeof navigator !== "undefined" && navigator.userAgent?.toLowerCase().includes(string);

Hopefully this will be fixed in a future release or update.

bjoerge commented 11 months ago

@Avii69: Node v16 is no longer maintained, please upgrade to v18, v20 (or >=v21.1.0) and see if it helps.

@francislagares: This looks like a duplicate of #5087 and #5183. Please try with Node v18, v20 or a version higher than v21.1.0.

Avii69 commented 11 months ago

@bjoerge : I have updated to node v 21.4.0 but still getting the same issue . Screenshot 2023-12-18 184630

bjoerge commented 11 months ago

@Avii69 Running DEBUG=sanity:cli:* npm run dev might give you some useful debugging info.