Home > Enterprise >  Uncaught (in promise) FirebaseError: No document to update
Uncaught (in promise) FirebaseError: No document to update

Time:05-23

I made a firestore database that looks like this.

enter image description here

I'm trying to make "stocks : 999" value change, so that it can be 998, 997, etc...

So I followed given instructions on firebase documentation (enter image description here

Why ?

By the way, I am using React, I don't know if this might be useful.

CodePudding user response:

Your code is trying to update a document with the path "/stocks/stocks". The error message is telling you that document doesn't exist. I'm inclined to agree, since the document you show in the screenshow has the path "/stocks/sL..G1" (redacted). You will need to use the correct document ID to build a path to the document to update.

  • Related