
wen i am trying to wrap the services on a provider it showing error why ???

import { Client, Databases, Account,ID} from "appwrite";
import conf from "../conf/conf";
export class Services{
client = new Client()
account
databases
constructor(){
this.client.setEndpoint(conf.Appwrite_url)
.setProject(conf.APPWRITE_PROJECT_ID)
this.account=new Account(this.client)
this.databases=new Account(this.client)
}
async register(email, password){
try {
await this.account.create(email,password)
await this.login(email,password)
} catch (error) {
console.log('there is some error in login')
return false
}
}
async login(email,password){
try {
await this.account.createEmailSession(email,password)
} catch (error) {
console.log('there is some error in login')
return false
}
}
async logout(){
try {
await this.account.deleteSessions('current')
} catch (error) {
console.log('there is some error in logout')
}
}
}
const services=new Services()
export default services here is my service file

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
- Internal 500 Server Error
I don't have much information but I am unable to create anything on database, Auth users are creating but not able to fetch into database
- CORS + 401 Error with Appwrite Authentic...
I'm getting a CORS + 401 Error with Appwrite Authentication Access to fetch at 'https://cloud.appwrite.io/v1/account/sessions/email' from origin 'https://my-c...
- Exposing project id and endpoint on GitH...
Is it best practice to expose your project id and endpoint in your appwrite.js file when publishing an NextJS or Angular project. If you use a .env file, that i...
