
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 to set up a user/member referral inv...
I just want one of my app users be able to create an invite to share them with friends, to grow the user base organically through referrals and track successful...
- "Best" way to handle Auth & User Collect...
Hi All! I'm trying to figure out the best way to "link" Accounts and my user collection. I know I can't link them with a relationship. I appreciate your though...
- CORS error
Hey everyone, I've been stumped on a CORS error trying to use the PATCH method on appwrite. I'm hosting locally. I keep getting the same two errors: 'https://c...
