Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Switching datasets in Sanity.json causing errors in studio and console

4 replies
Last updated: Jun 9, 2020
hey all... how do i switch datasets? now that my schema is 99% setup i wanted to start working from an empty dataset for entering production content.
i went into
sanity.json
and set the dataset to my new one, but now i'm getting a bunch of errors in studio
Jun 9, 2020, 2:11 PM
here's the error in the browser

SyntaxError: Unexpected token / in JSON at position 107
    at JSON.parse (<anonymous>)
    at parseManifest (/Users/bflory/Development/yamamoto/goyamamoto/backend/node_modules/@sanity/resolver/lib/readManifest.js:44:29)
    at /Users/bflory/Development/yamamoto/goyamamoto/backend/node_modules/@sanity/resolver/lib/readManifest.js:68:18
Jun 9, 2020, 2:11 PM
also i can't switch back to the previous dataset now either
Jun 9, 2020, 2:12 PM
console error when i run
sanity start


Error occured trying to resolve project root:
Unexpected token / in JSON at position 131
Jun 9, 2020, 2:13 PM
SOLVED: for anyone looking in the future, I had commented out the old dataset, and added the new one...
can't believe i've not run across this before, but apparently you can't use commenting in JSON
Jun 9, 2020, 3:04 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?