Watch a live product demo đź‘€ See how Sanity powers richer commerce experiences

Troubleshooting dataset and project deletion on

20 replies
Last updated: May 19, 2023
Hello! Just joined! I need some assistance if possible please. I am trying to delete a dataset, going through the prompts, it ends with "Can not delete project". I have an empty dataset that I am trying to use on another project instead, that's if I can't delete it. It is proving difficult as well, or I am not sure on how to properly do that. I've been creating new datasets and if they don't work, I just create another as I can not delete the last one or figure out how to use it. Appreciate any help! Thank you!
May 19, 2023, 3:45 PM
Which method are you using to delete your dataset 🙂
May 19, 2023, 3:49 PM
Oh thank you! Excuse the late reply, I put this text into the help channel instead. Trying to delete it on the website. Created the account and have admin rights to the empty project. Delete project > type in the name > Can not delete.
May 19, 2023, 5:28 PM
Got it! Just to clarify, are you trying to delete the project or the dataset? You mentioned both, so I just want to make sure.
May 19, 2023, 5:37 PM
Apologies! The project, > project > settings > delete projectWhere the danger zone is located.
Thank you!
May 19, 2023, 5:41 PM
Got it! Is there anything in the console that may help pinpoint what’s wrong?
May 19, 2023, 6:17 PM
Excuse, I did not understand. All that pops up on the bottom right of the webpage is "Could not delete project". Not sure if I would be able to see anything through devtools. Can you please explain further on how I might be able to check? Thank you! I appreciate the help highly and heavily.
May 19, 2023, 6:26 PM
No worries! Your browser’s console may have more information about why it’s failing. Opening it is different for each browser, so if you don’t know how, you can search your browser’s name + open console to find out how.
May 19, 2023, 6:44 PM
Oh! As in Devtools maybe? Yeah it's a CORS problem it seems.Error:

ps:// ' from origin ' ' has been blocked by CORS policy: Method DELETE is not allowed by Access-Control-Allow-Methods in preflight response.
Excuse, I had checked devtools but it wasn't showing anything until I enabled showing CORS errors.
May 19, 2023, 7:50 PM
Very strange that it’s giving you a CORS error from the manage site!
May 19, 2023, 8:03 PM
I am stumped as well, I have tried on other browsers. Would I need to open up a ticket? Is there anyway I could maybe give more information or logs?
May 19, 2023, 8:19 PM
If you give me the project ID, I can add myself to the project and see if I can delete it for you
May 19, 2023, 8:21 PM
Sure ! Thank you !lu0i0fv6
I have another question, mind if I can ask? It pertains to hiding projectId and dataset.
May 19, 2023, 8:23 PM
Go for it!
May 19, 2023, 8:23 PM
Trying to figure out how to hide projectId and dataset in an .env.local file so I could upload the project as public on github. Does that matter? Especially that users would need to log into sanity to utilize the projectId? They wouldn't be able to make calls to that ID, would it be counted as an API key?
May 19, 2023, 8:24 PM
You don’t have to worry about hiding those at all! Your project id and dataset names aren’t considered secret since they’re easily discoverable if anyone opens up the network tab. CORS will stop people from making calls to your site if they do bother to find them. You just have to worry about obscuring API tokens you generate and use outside of the Studio.
May 19, 2023, 8:29 PM
Ok, I didn’t have issues deleting the project. Do you have any browser extensions installed or are you using a firewall/VPN? That may have been causing the error.
May 19, 2023, 8:32 PM
I have firewalls off, I've tried on chrome and edge. I don't use a VPN, I have CORS unblock extension and React dev tools.
I deleted the extension and tried again and it worked! I'm face palming, been a problem for a while. Thank you
May 19, 2023, 8:38 PM
Glad we got it figured out!!
May 19, 2023, 8:43 PM
I have no more enquiries, grateful that you replied. Made my week! Till next time! Which might be soon! Hoping I can figure it out myself. You have a great day!
May 19, 2023, 8:49 PM
You too!
May 19, 2023, 8:50 PM

Sanity– build remarkable experiences at scale

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

Categorized in

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
After adding the subtitle and running this code npm run graphql-deploy It does nothingSep 15, 2020
how to limit a reference to just one entry in Studio reference input side versus the default as-many-entries-as-you-fill-in-an-array...Sep 18, 2020
Is it possible to fetch more than one "_type" using GROQ?Nov 2, 2020
I want to add a view with the Structure builder (S.view.component) where I list similar documents based on the title. What...Sep 23, 2020
Is there a structure builder example where the format of each preview for the document list is modified?Feb 3, 2021
I have an array of references to a country schema type but it always just returns NULL values for meJan 30, 2021
Hi, I need help with a query for getting the url of an image asset. Here is what I've been trying, but I only get the _ref...Dec 1, 2020
Sanity UI looks brilliant :smiley: Is something like the current date picker possible at the moment? I’m not sure if anicon...Dec 21, 2020
Hey everyone. I have been coding and may have potentially accidentally deleted something. Does anyone know how to resolve...Dec 26, 2020
Hello everyone and happy new year :raised_hands::skin-tone-2:, I have a problem with outputting Portable Text :disappointed:...Jan 1, 2021

Related contributions

Clean Next.js + Sanity app
- Template

Official(made by Sanity team)

A clean example of Next.js with embedded Sanity ready for recomposition.

Cody Olsen
Go to Clean Next.js + Sanity app

Blog with Built-in Content Editing
- Template

Official(made by Sanity team)

A Sanity-powered blog with built-in content editing and instant previews.

Go to Blog with Built-in Content Editing