Back

Nuxt 3 with Appwrite: appwrite init project

  • 0
  • Web
David Schubert
9 Jun, 2023, 13:13

i commented the appwrite part out. now the problem is maybe gone.

TL;DR
The user is experiencing issues with using Appwrite in Nuxt 3. They mention finding a solution by putting the new Client function in an onBeforeMount Lifecycle Hook. The user also mentions a bug in the Nuxt demo for Server Side Login and Refresh. They are unsure about deploying Nuxt into Appwrite and describe encountering problems when using Appwrite CLI commands. The user provides a link to an example project and asks if it is recommended to install nuxt-appwrite and appwrite through npm. The conversation ends with the user commenting out the Appwrite part to resolve the problem temporarily.
David Schubert
9 Jun, 2023, 13:17

weird

David Schubert
9 Jun, 2023, 13:18

did you ever used appwrite in combination with nuxt 3?

David Schubert
9 Jun, 2023, 13:18

and would you recommend to npm install appwrite

David Schubert
9 Jun, 2023, 13:18

or would you "npm install nuxt-appwrite"?

David Schubert
9 Jun, 2023, 13:19

my problem with "nuxt-appwrite" was that i couldn't install the appwrite cli and do the following steps: appwrite init project appwrite init function appwrite deploy function

Binyamin
9 Jun, 2023, 13:40

Yes

Binyamin
9 Jun, 2023, 13:40

You can see also hete an example of project

Binyamin
9 Jun, 2023, 13:41
David Schubert
9 Jun, 2023, 13:42

omg! the problem is back

Binyamin
9 Jun, 2023, 13:42

What is the output it here

David Schubert
9 Jun, 2023, 13:43

everytime when i use the appwrite cli with the following commands:

appwrite init project appwrite init function appwrite deploy function

Binyamin
9 Jun, 2023, 13:46

What's error you're getting?

David Schubert
9 Jun, 2023, 13:50
David Schubert
9 Jun, 2023, 13:54

weird isn't it?

David Schubert
9 Jun, 2023, 13:59

so i only get problems when i want to use appwrite functions

Binyamin
9 Jun, 2023, 14:09

I think I'm lost a bit. Are you deploying nuxt into Appwrite function?

David Schubert
9 Jun, 2023, 14:09

nope

David Schubert
9 Jun, 2023, 14:13

you know what

David Schubert
9 Jun, 2023, 14:14

i just realized that the nuxt demo is the only one where the Server Side Login and Refresh doesn't work. In all demos it's working. Only Nuxt not:

https://nuxt.ssr.almostapps.eu/

David Schubert
9 Jun, 2023, 14:15

i need to go to bed. i'm gonna check tomorrow my code again

Drake
9 Jun, 2023, 17:48

@Meldiron is there a bug?

David Schubert
9 Jun, 2023, 19:44

Good question 🙂

David Schubert
10 Jun, 2023, 11:50

i found a solution. i need to put the new Client function in a onBeforeMount Lifecycle Hook. Does anybody has a answer why?

TypeScript
onBeforeMount(() => {
    client.value = new Client();
    client.value
        .setEndpoint("https://cloud.appwrite.io/v1")
        .setProject("***");

    account.value = new Account(client.value);
});
Meldiron
11 Jun, 2023, 08:38

Seems like. Ill make myself note to check it

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