Back

m.createEmailSession is not a function when using Svelte at build

  • 0
  • Realtime
Hexi
2 Jun, 2024, 09:35

I am having an issue after upgrading appwrite, that it cant create an emailsession for some reason:

TypeScript
async function createSession(email, password) {
  try {
    return await account.createEmailSession(email, password);
  } catch (e) {
    //console.log(e);
    return { error: e.message }; // `returns m.createEmailSession is not a function` when it prod
  }
}
TL;DR
Issue: Error message "m.createEmailSession is not a function" occurring when using Svelte at build after upgrading appwrite. Solution: Change `account.createEmailSession` to `account.createEmailPasswordSession` to resolve the issue.
Hexi
2 Jun, 2024, 09:38

After changing it to account.createEmailPasswordSession it seems to work?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more