
I'm following the documentation on https://appwrite.io/docs/quick-starts/node and am getting a Database not found error. I've confirmed the database is getting created, but any time I try to access it programmatically it fails. I'm using node-appwrite 13.0.0
TypeScript
const databases = new sdk.Databases(client);
var todoDatabase;
var todoCollection;
async function prepareDatabase() {
//This works
todoDatabase = await databases.create(
sdk.ID.unique(),
'TodosDB'
);
//It errors here
todoCollection = await databases.createCollection(
todoDatabase.$id,
sdk.ID.unique(),
'Todos'
);
}
TL;DR
Documentation is being followed to create a database using node-appwrite 13.0.0, but facing 'Database not found' error. The issue arises when trying to create a collection within the database programmatically.
Solution: Ensure that the collection creation process is handled correctly. Double-check the syntax and parameters used for creating the collection within the database.Recommended threads
- Failed sending to target forbidden error
// Send test email using the specific target ID await messaging.createEmail( 'unique()', // messageId 'Test Email, // subject ...
- What is the property typescript type for...
the template of Bun.js gives me something like this: `export default async ({ req, res, log, error }: any) => {`, can i replace the `any`with the real type? 🙂
- How to add custom claims to a Google Sig...
For example, i would like to add organization info to the token. 🙂
