Avi is experiencing an error after updating and seeks help troubleshooting.
21 replies
Last updated: May 4, 2020
A
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):
I have no idea where to even begin troubleshooting...
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)
May 4, 2020, 1:36 PM
M
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
S
Sure. Let me share the files.
May 4, 2020, 1:46 PM
S
Lust a few, LOL
May 4, 2020, 1:48 PM
M
A handful 🙂 Thanks Avi! And
groupProblems.jsin this case, is that not a schema file?
May 4, 2020, 1:50 PM
S
nope. Let me search for it, though
May 4, 2020, 1:52 PM
S
No file in the whole project
May 4, 2020, 1:53 PM
S
No mention in node_modules
May 4, 2020, 1:53 PM
M
The name tricked me but that’s actually an internal Sanity file, hold on 🙂
May 4, 2020, 1:55 PM
S
👍
May 4, 2020, 1:55 PM
S
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
M
There should be a new
package-lock.jsonfile after removing
node_modulesand running
npm install. Otherwise maybe try running
sanity upgradeonce again, then removing
node_modulesand
package-lock.json, then running
npm installin the Studio root.
May 4, 2020, 1:58 PM
S
Will do. I'll let you know once I get that done
May 4, 2020, 1:59 PM
A
😭
May 4, 2020, 2:47 PM
A
I've got a lock file this time, but same error...
May 4, 2020, 2:47 PM
P
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.
(and updating your deskStructure accordingly to avoid those errors)
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([ coInfo, ]), });
May 4, 2020, 2:59 PM
P
There’s a ghost comma in `seoGeneral.js`:
That comma right in the middle is probably what’s causing the build error, as
... { name: "metaImage", type: "cloudinaryUrlInput", title: "Meta Image", }, , { name: "metaImageAlt", type: "string", title: "Meta Image Alt Text", description: "Used by users who are visually impared", }, ...
groupProblems.jsis tied to schema validation.
May 4, 2020, 3:01 PM
A
\o/
May 4, 2020, 3:50 PM
A
Works!!
May 4, 2020, 3:50 PM
A
Sorry for the delayed reply, I had a meeting
May 4, 2020, 3:50 PM
A
Tx much
May 4, 2020, 3:50 PM
P
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.