Back

response: { message: 'Server Error', code: 500, type: 'general_unknown', version:

  • 0
  • Web
CodeWithRemi
3 Oct, 2024, 13:25

I am following a tutorial online, When i want to create a new appointment, i get the following error in my terminal:

AppwriteException: Server Error at _Client.call (webpack-internal:///(action-browser)/./node_modules/node-appwrite/dist/client.mjs:287:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Databases.createDocument (webpack-internal:///(action-browser)/./node_modules/node-appwrite/dist/services/databases.mjs:1673:12) at async $$ACTION_0 (webpack-internal:///(action-browser)/./lib/actions/appointment.actions.ts:21:32) .... at async requestHandlerImpl (C:\Users\Nukelimer\Desktop\Projects\remi-law-firm\node_modules\next\dist\server\lib\router-server.js:377:13) at async Server.requestListener (C:\Users\Nukelimer\Desktop\Projects\remi-law-firm\node_modules\next\dist\server\lib\start-server.js:141:13) { code: 500, type: 'general_unknown', response: { message: 'Server Error', code: 500, type: 'general_unknown', version: '1.6.0' } }

TL;DR
Developers are encountering a server error (code 500) due to a version mismatch with Appwrite between their locally hosted instance and the npm package version. The solution is to update the "node-appwrite" version in their "package.json" file to match their self-hosted instance (e.g., change from 1.12.0 to 1.14.0). This is applicable for installations that are not from cloning a GitHub repo.
Tomic R.
3 Oct, 2024, 13:27

Can you please share the code responsible for this error?

Tomic R.
3 Oct, 2024, 13:28

And which tutorial are you following?

CodeWithRemi
3 Oct, 2024, 13:29

JSMastery. I am trying to make his Patient Management System

CodeWithRemi
3 Oct, 2024, 13:30

Here is the code.

Tomic R.
3 Oct, 2024, 13:39

Okay, so I think I found your problem

Tomic R.
3 Oct, 2024, 13:39

@CodeWithRemi I think you have cloned the github repo and then installed the dependencies like described in the README, right?

TypeScript
Cloning the Repository

git clone https://github.com/adrianhajdin/healthcare.git
cd healthcare
Installation

Install the project dependencies using npm:

npm install
Tomic R.
3 Oct, 2024, 13:42

If that is the case (and you have freshly installed appwrite), then you have a simple version mismatch.

The npm package you are installing for appwrite is for appwrite versions 1.5.x, but you have a self hosted instance of 1.6.x. Simply go to your "package.json" file, locate "node-appwrite" and change the version to 1.14.0 instead of 1.12.0

CodeWithRemi
3 Oct, 2024, 13:48

No, i made a fresh installation and didn't clone his repo.

CodeWithRemi
3 Oct, 2024, 13:48

"node-appwrite": "^14.1.0", this is the version of appwrite that i have installed.

Tomic R.
3 Oct, 2024, 13:51

ouf

Tomic R.
3 Oct, 2024, 13:51

Can you please check the logs of your self hosted instance (the docker logs)

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