Get a peek at our latest innovations at Sanity Product Day on Dec 8th →

An Error Erased During Commit: E is Not a Function

10 replies
Last updated: Sep 30, 2021

Hello, I am getting this error in the latest version of sanity:An error occurred during commit: e is not a function.

This happens every time I try to create any new document. Worth noting I am using the experimental feature Spaces. I wonder if anyone else is having this issue?

Sep 28, 2021, 10:52 PM

Hi

user M
, no there are no additional logs or errors in the console. There does appear to be a GET request in the network tab but that returns a 200 response so that seems fine.

Sep 29, 2021, 6:00 AM

Hi

user M
, no there are no additional logs or errors in the console. There does appear to be a GET request in the network tab but that returns a 200 response so that seems fine.

Sep 29, 2021, 6:00 AM

user M
, This issue is still occurring. I’d like to try and roll back my sanity version to see if I can get it going. I can only see
sanity upgrade
as an option in the cli. Is there a recommended method for downgrading?

Sep 29, 2021, 11:39 PM

Before rolling back, can you try deleting node_modules, then reinstalling?

Sep 29, 2021, 11:59 PM

Sure, good idea actually…

Sep 30, 2021, 12:28 AM

I think I did something weird where I installed sanity cli locally as opposed to globally.

Sep 30, 2021, 12:32 AM

this will get you a global install:

npm install -g @sanity/cli

Sep 30, 2021, 12:34 AM

user M
you’re my hero 🙌 right before this weeks WIP too.

Sep 30, 2021, 12:34 AM

Hahaha, very happy to help!

Sep 30, 2021, 12:35 AM

Hahaha, very happy to help!

Sep 30, 2021, 12:35 AM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Free to get started, and pay-as-you-go on all plans. Find out more.