-
Notifications
You must be signed in to change notification settings - Fork 7
Seeding error for fields with Date #13
Copy link
Copy link
Open
Description
I have a Timestamp-like field by using new Date() in declaring a seed.
const messagesCollection = seed.collection("messages", [
seed.doc("message1", {
content: "Hello firestore-seed.",
created: new Date(),
}),
seed.doc("message2", {
content: "Good bye firestore-seed.",
created: new Date(),
})
]);
But I get an error:
Seeding failed: Error: Value for argument "data" is not a valid Firestore document. Detected an object of type "Timestamp" that doesn't match the expected instance (found in field "created"). Please ensure that the Firestore types you are using are from the same NPM package.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels