Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6581

Error seeding data: [AppwriteException: Invalid document structure: Missing required attribute "image"]

$
0
0

Working on a react native app and having issues with the Appwrite database.

here is the error:

ERROR Error seeding data: [AppwriteException: Invalid document structure: Missing required attribute "image"]

import { ID } from "appwrite";import { databases, config } from "./appwrite";import { agentImages, galleryImages, propertiesImages, reviewImages } from "./data";const COLLECTIONS = {  AGENT: config.agentsCollectionId,  REVIEWS: config.reviewsCollectionId,  GALLERY: config.galleriesCollectionId,  PROPERTY: config.propertiesCollectionId,};const propertyTypes = ["House","Townhome","Condo","Duplexe","Studio","Villa","Apartment","Other",];const facilities = ["Laundry","Car-parking","Sports-center","Cutlery","Gym","Swimming-pool","Wifi","Pet-center",];I tried to check the database and I used AI to assist me with the issues that I am having problems with but it instead accurate or right and not able to resolve the issue.[[database](https://i.sstatic.net/e8c74aZv.png)][[error while app is running](https://i.sstatic.net/3US9vTlD.png)]What I tried: I tired to change the image in the database to a string or a url and<br /> both didn't work when seeding the database.I also tried to create the images and the properties myself where I can <br /> check if the loop runs or not and <br /> where the error might occur within the data and the code for seeding the data

Viewing all articles
Browse latest Browse all 6581

Latest Images

Trending Articles



Latest Images