App uses react +TS + vite
Can you share your code?
Change this
import { account } from "../../appwrite";
To this
import { account } from "appwrite";
You'll also need initialize a client Check this
I am exporting that from a file called appwrite.d.ts
from root folder
Yes
I see now, why you've added the d
in the .d.ts
if I use .ts
this happens
Probably because it can't be the same name
Change it to appwriteConfig.ts
and the import and re test
okay
Changed it but same as above
What error now?
Ohh Yes,
For <:vite:1007379819660595291> vite
any files most be inside the src foler
Move the appwriteConfig.ts
into the src
one
And change the login to
import { account } from "../appwriteConfig";
Thanks its working
Recommended threads
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...