getting this error while everything seems fine please help me solve it
this is how my config file looks:
export const appwriteConfig = { projectId :import.meta.env.VITE_APPWRITE_PROJECT_ID, url :import.meta.env.VITE_APPWRITE_URL, databaseId :import.meta.env.VITE_APPWRITE_DATABASE_ID, storageId :import.meta.env.VITE_APPWRITE_STORAGE_ID, userCollectionId :import.meta.env.VITE_APPWRITE_USER_COLLECTION_ID, postCollectionId :import.meta.env.VITE_APPWRITE_POST_COLLECTION_ID, savesCollectionId :import.meta.env.VITE_APPWRITE_SAVES_COLLECTION_ID, };
export const client = new Client() .setProject('appwriteConfig.projectId') .setEndpoint('appwriteConfig.url');
export const account = new Account(client); export const databases = new Databases(client); export const storage = new Storage(client); export const avatars = new Avatars(client);
and this is my .env file looks
VITE_APPWRITE_PROJECT_ID = 6799f41bxxx5b7d20d5b
VITE_APPWRITE_URL = https://cloud.appwrite.io/v1
VITE_APPWRITE_STORAGE_ID = 679a574e0xxxxxx060a
VITE_APPWRITE_DATABASE_ID = 679a5xxxxxx0637725e
VITE_APPWRITE_POST_COLLECTION_ID = 679a57dxxxxxxx5a1c26a
VITE_APPWRITE_USER_COLLECTION_ID = 679a582xxxxd5c4049a7
VITE_APPWRITE_SAVES_COLLECTION_ID = 6xxx584300xxx8fa7424
Can you give the code for signInAccount in the file api.ts
Oh nevermind. The issue is you have your stuff wrapped in quotes. It should be.
export const client = new Client()
.setProject(appwriteConfig.projectId)
.setEndpoint(appwriteConfig.url);
FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting).
Recommended threads
- How can I disable client-side account re...
Hi everyone! I’m currently building a game backend using Appwrite, and I’d like to prevent users from creating new accounts directly through the client. My go...
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...
- Domain is owned by a different organizat...
Hi Appwrite team, I'm trying to add my custom domain **futlive9.com** to my project, but I'm getting the error: "Domain is owned by a different organization." ...