🎤 Builder Talk: The Story Behind Lady Gaga’s Digital Experience – Register now

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– 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?

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
Hey all - what’s the quickest way to batch delete all documents of a certain type? It looks like the `sanity` cli tool allows...Jan 29, 2021
Best way to convert HTML to a PortableText object?Dec 3, 2020
CLI Error - zsh: command not foundJan 29, 2022
Troubleshooting GraphQL deployment with Sanity CLI loginMay 24, 2020
Troubleshooting logging in to the CLI tool using a token in a CI/CD environment.Jul 28, 2020
How to delete all docs of a specific doc type via cli?Nov 13, 2020
Changing the default view in Sanity StudioApr 15, 2020
Issue with automated build failing due to missing next.js CLIAug 24, 2020
Help needed with CLI dataset export error and duplicating datasetsMay 13, 2020
Hi everyone. I'm new to using Sanity and having a bit of an issue with local development, and wondering if someone is able...Dec 29, 2020

Related contributions

Turbo Start Sanity
- Template

The battle-tested Sanity template that powers Roboto Studio's websites

Go to Turbo Start Sanity

Schema UI - Next.js Sanity Starter
- Template

A Next.js starter template with Next.js 15, Tailwind CSS, shadcn/ui, and Sanity CMS with Live Editing. Get production-ready React components with matching Sanity schemas and queries. Build dynamic pages faster while keeping full control over customization.

Serge Ovcharenko
Go to Schema UI - Next.js Sanity Starter

The Swaddle
- Made with Sanity

A new brand identity to represent a more mature company, to signify The Swaddle’s evolution from publisher to production house, combined with an easier to navigate platform that can surface multiple content types - drawing readers through The Swaddle’s content offering.

Nightjar
Go to The Swaddle