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

Issue with commenting on distinct words/sentences in Sanity studio, error when upgrading to latest version

4 replies
Last updated: Apr 17, 2024
Hi! I have a quick question regarding Comments. I know it’s still in beta, but according to this , “Comments can be attached to any compatible field, or even to distinct sentences or words within Portable Text!”
But in my studio, I am only able to comment on whole sections, and not distinct words/sentences inside. Does anyone know what could be the issue? Am on sanity version 3.21.1, thanks!
Apr 16, 2024, 12:31 PM
Can you try updating to the latest version?
Apr 16, 2024, 4:21 PM
thanks for the help, if I upgrade to latest version i.e. 3.38.0, I get an error when I try to run the studio locally, any idea what could be the issue?

1] TypeError: Cannot read properties of undefined (reading 'div')
[1]     at Object.<anonymous> (/Users/gurdenbatra/Desktop/circulaw/studio/node_modules/sanity/node_modules/@sanity/ui/dist/index.js:1237:40)
[1]     at Module._compile (node:internal/modules/cjs/loader:1376:14)
[1]     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
[1]     at Module.load (node:internal/modules/cjs/loader:1207:32)
[1]     at Module._load (node:internal/modules/cjs/loader:1023:12)
[1]     at Module.require (node:internal/modules/cjs/loader:1235:19)
[1]     at require (node:internal/modules/helpers:176:18)
[1]     at Object.<anonymous> (/Users/gurdenbatra/Desktop/circulaw/studio/node_modules/sanity/lib/_chunks-cjs/_internalBrowser.js:2:899)
[1]     at Module._compile (node:internal/modules/cjs/loader:1376:14)
[1]     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
[1] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'div')
[1]     at Object.<anonymous> (/Users/gurdenbatra/Desktop/circulaw/studio/node_modules/sanity/node_modules/@sanity/ui/dist/index.js:1237:40)
[1]     at Module._compile (node:internal/modules/cjs/loader:1376:14)
[1]     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
[1]     at Module.load (node:internal/modules/cjs/loader:1207:32)
[1]     at Module._load (node:internal/modules/cjs/loader:1023:12)
[1]     at Module.require (node:internal/modules/cjs/loader:1235:19)
[1]     at require (node:internal/modules/helpers:176:18)
[1]     at Object.<anonymous> (/Users/gurdenbatra/Desktop/circulaw/studio/node_modules/sanity/lib/_chunks-cjs/_internalBrowser.js:2:899)
[1]     at Module._compile (node:internal/modules/cjs/loader:1376:14)
[1]     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
Apr 17, 2024, 8:46 AM
hey thanks that fixed the issue!
Apr 17, 2024, 8:52 AM
Great!
Apr 17, 2024, 4:27 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?