-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appwrite CLI command "appwrite init project" causes error 500. #21510
Comments
@danielroe i found a solution. i need to put the new Client function in a onBeforeMount Lifecycle Hook. Does anybody has a answer why?
|
I would guess that there might be an issue with ssr and appwrite. It would be worth investigating and updating their template, either way. |
@danielroe So it's more a Appwrite with SSR problem, then a nuxt 3 problem? |
Maybe. Maybe not. Do you have a reproduction that doesn't require me to install the appwrite CLI and set up an account? |
@danielroe It seems that there are some compatibility issues between Nuxt 3, Vite and the Appwrite JavaScript SDK. Vite has some issues with handling CommonJS modules, and Appwrite is currently releasing its SDKs as CommonJS modules. The problem is there even without installing the appwrite CLI. The problem also exists if I want to import an appwrite instance globally via a useAppwrite.js composable. I always get the following error message on the nuxt 3 page:
And the console errors:
The useAppwrite.js looks like this:
|
Environment
"nuxt": "^3.5.2"
"appwrite": "^11.0.0",
Reproduction
https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz?file=README.md
Can't really reproduction the problem. Because you can't install the Appwrite CLI on Stackblitz or Codesandbox.
Appwrite CLI:
https://appwrite.io/docs/command-line
and you need a simple appwrite account and project to init it.
Describe the bug
There is a bug in the combination of Nuxt 3 and Appwrite. If you start with a normal Nuxt 3 App and some Appwrite commands. Then everything works fine!
The bug starts when you start to use the Appwrite CLI and use the following command "appwrite init project" and init the project you are working on. After this, the app is not working anymore and gives me always an 500 error:
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: