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

Avi is experiencing an error after updating and seeks help troubleshooting.

21 replies
Last updated: May 4, 2020
Hi all.
I just updated and now I get the following error in the browser when I view my local compile (no compile errors shown):

groupProblems.js:114 Uncaught TypeError: Cannot read property 'problems' of undefined
    at groupProblems.js:114
    at Array.filter (<anonymous>)
    at groupProblems (groupProblems.js:114)
    at module.exports (createSchema.js:41)
    at Object.<anonymous> (schema.js:20)
    at __webpack_require__ (bootstrap 5529c9b457dd443d8859:712)
    at fn (bootstrap 5529c9b457dd443d8859:117)
    at Object.<anonymous> (DocumentsListPane.js:14)
    at __webpack_require__ (bootstrap 5529c9b457dd443d8859:712)
    at fn (bootstrap 5529c9b457dd443d8859:117)
I have no idea where to even begin troubleshooting...
May 4, 2020, 1:36 PM
Undefined problems, that’s a great place to start 😄 Sorry you’re having some trouble after the update, Avi. Do you have any schema files you could share with me in DM? Or a repo if you prefer.
May 4, 2020, 1:40 PM
Sure. Let me share the files.
May 4, 2020, 1:46 PM
Lust a few, LOL
May 4, 2020, 1:48 PM
A handful 🙂 Thanks Avi! And
in this case, is that not a schema file?
May 4, 2020, 1:50 PM
nope. Let me search for it, though
May 4, 2020, 1:52 PM
No file in the whole project
May 4, 2020, 1:53 PM
No mention in node_modules
May 4, 2020, 1:53 PM
The name tricked me but that’s actually an internal Sanity file, hold on 🙂
May 4, 2020, 1:55 PM
May 4, 2020, 1:55 PM
If it helps, I had trouble updating Sanity just before this problem cropped up. I ended up having to delete node_modules and installing via
npm install
. I noticed there's no package lock file. Maybe it's a faulty install? Or I did it wrong?
May 4, 2020, 1:57 PM
There should be a new
file after removing
and running
npm install
. Otherwise maybe try running
sanity upgrade
once again, then removing
, then running
npm install
in the Studio root.
May 4, 2020, 1:58 PM
Will do. I'll let you know once I get that done
May 4, 2020, 1:59 PM
May 4, 2020, 2:47 PM
I've got a lock file this time, but same error...
May 4, 2020, 2:47 PM
Hmm, seems to be an issue with the schema in that case, because you’re running all the latest versions of Sanity now, correct? (i.e. that update ran successfully)
Could you try to build the Studio with just a single schema to see if that works? i.e.

// First, we must import the schema creator
import createSchema from "part:@sanity/base/schema-creator";

// Then import schema types from any plugins that might expose them
import schemaTypes from "all:part:@sanity/base/schema-type";

import coInfo from "./coInfo";

// Then we give our schema to the builder and provide the result to Sanity
export default createSchema({
  // We name our schema
  name: "default",
  // Then proceed to concatenate our document type
  // to the ones provided by any plugins that are installed
  types: schemaTypes.concat([
(and updating your deskStructure accordingly to avoid those errors)
May 4, 2020, 2:59 PM
There’s a ghost comma in `seoGeneral.js`:
      name: "metaImage",
      type: "cloudinaryUrlInput",
      title: "Meta Image",
      name: "metaImageAlt",
      type: "string",
      title: "Meta Image Alt Text",
      description: "Used by users who are visually impared",
That comma right in the middle is probably what’s causing the build error, as
is tied to schema validation.
May 4, 2020, 3:01 PM
May 4, 2020, 3:50 PM
May 4, 2020, 3:50 PM
Sorry for the delayed reply, I had a meeting
May 4, 2020, 3:50 PM
Tx much
May 4, 2020, 3:50 PM
Awesome, thanks for confirming!
May 4, 2020, 4:06 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?