
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
- Looking for Partner
I'm looking for partner for long-term collaborating. Of course, I'll pay for you. If you are interested, Please DM me.
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: {聽聽"name":聽"upload-whitelist",聽聽"type"...
- Looking for Partner
I'm looking for partner for long-term collaborating. Of course, I'll pay for you. If you are interested, Please DM me.
