Issue with crashing after updating Sanity CLI, resolved by removing a part implementation in sanity.json.

13 replies
Last updated: Aug 11, 2021
Hi there. I just updated sanity cli to v.2.13.1 and I'm having this strange issue. I'm trying to edit some articles (or create new ones) locally, but the whole thing crashes. I can't for the life of me figure out exactly what causes it, could this be a Sanity bug with the latest update?
Aug 11, 2021, 9:36 AM
Hi Kristoffer, could you try removing your
node_modules
folder and
package-lock.json
+
yarn.lock
files before running
npm install
and starting the studio once more?
Aug 11, 2021, 9:43 AM
I already did, but for good measure I'll try again!
Aug 11, 2021, 9:44 AM
Sorry
user M
, the problem still occurs! Also checked for other updates with the
yarn upgrade-interactive --latest
command, but everything should be up to date
Aug 11, 2021, 9:58 AM
We just released a new version of the studio a few moments ago (
v2.14.0
) - could you try to upgrade once more to see if that helps? If not, we'll dig deeper πŸ™‚
--
Upgrade the Command Line Interface (CLI) with:

npm install --global @sanity/cli
(or with yarn)

Upgrade the Sanity Studio with:

sanity upgrade
Aug 11, 2021, 10:10 AM
Ayy, I had such big hopes, but still a no-go! I'm not quite sure where to start debugging this, most of the studio stuff is out of the box
Aug 11, 2021, 10:18 AM
Are you using any custom input components or plugins? Please feel free to share the plugins array of your
sanity.json
file here.
Aug 11, 2021, 10:22 AM
Thanks for sharing πŸ™‚ It might be related to the
media-library
in this case. However, one more thing to check: are you using any custom asset sources that you know of?
For example, an implementation that includes:

import Default from 'part:@sanity/form-builder/input/image/asset-source-default'
Aug 11, 2021, 10:34 AM
Not that I'm aware of, only similar thing I can find is in the
sanity.json
file:
"parts": [
    {
      "implements": "part:@sanity/form-builder/input/image/asset-source",
      "path": "./assetSource.js"
    },
]
Not sure if that is the same as importing into a component?
Aug 11, 2021, 10:39 AM
Yes, I believe that's relevant here. Could you test if the issue persists when taking out that part implementation?
Aug 11, 2021, 10:43 AM
That seemed to do the trick! So what am I missing here? I didn't start the project myself, and I've mostly worked on the web side of it until now. Lots to learn πŸ˜…
Aug 11, 2021, 10:54 AM
I'm afraid you've discovered a bug here πŸ™‚ We'll try to reproduce it on our end and see if we can get a fix out. In the meantime, please let me know if you run into any issues or are missing a custom asset source implementation you were expecting to be there.
Aug 11, 2021, 11:03 AM
Alright, thanks a bunch for all the help!
Aug 11, 2021, 11:04 AM
i.e. when adding images to a document, custom asset sources let you pull in images from external sources such as Cloudinary, Unsplash, etc.
Aug 11, 2021, 11:04 AM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the 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?