i am facing this error while using the appwrite service to create a blog platform . i have cross checked all the env variables .
this is the piece of code where i am setting up the client and account and using them in a try catch and then using it in the app.js
i have done all the necessary imports . still unable to understand the error and dont know how to solve it
export class AuthService {
client = new Client();
account;
constructor() {
this.client
.setEndpoint(conf.appWriteUrl)
.setProject(conf.appWriteProjectId);
this.account = new Account(this.client);
}
async getCurrentUser() {
try {
return await this.account.get();
} catch (error) {
console.log("Appwrite service :: getCurrentUser :: error", error);
}
return null;
}
}