Hi, I am using express and i'm getting an error with the database.createDocument: {"success":false,"message":"database.createDocument is not a function"}
This only shows if i want to import the database from another file, the config file is looking like this now:
import { Client, Databases } from 'node-appwrite';
const client = new Client();
client
.setEndpoint(process.env.APPWRITE_ENDPOINT)
.setProject(process.env.APPWRITE_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
export const database = new Databases(client);
And im importing it like this:
import { database } from '../config/appwrite.js';
and i get the error
The weird thing is the documents are being created, but the error is not dissapearing.
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...