Open shefin-xyz opened 2 months ago
An error occurred while retrieving the patient details: SyntaxError: "undefined" is not valid JSON at JSON.parse () at i (/var/task/.next/server/chunks/30.js:1:19308) at b (/var/task/.next/server/app/patients/[userId]/register/page.js:1:46676) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /var/task/.next/server/app/patients/[userId]/register/page.js:1:3374
I was experiencing the same issue. I searched through many forums and read more information in the documentation, but I couldn't find the solution until I realized that the node-appwrite package is constantly being updated. I was using version 13.0.0, which basically broke the Query function and returned nothing. What I did was install version 12.0.1, and that fixed the problem. Note that when you downgrade to this version, the import { InputFile } from 'node-appwrite/file' changes to just
import { InputFile } from 'node-appwrite';
and you will need to change fromBuffer to fromBlob.
This solved the issue.
This didn't help, the error appeared initially with version 12.0.1, I upgraded to 13.0.0 and changed the import to import { InputFile } from 'node-appwrite/file and the fromBlob and I still seem to be stuck at this stage
I have the same error but with the first user that i created it works fine but when I try creating appointment with second user it break and gives me this error
@junior8adlt thanks for the solution it worked
@junior8adlt Thank you very much it worked for me. Thank you.......
An error occurred while retrieving the patient details: SyntaxError: "undefined" is not valid JSON at JSON.parse ()
at i (/var/task/.next/server/chunks/30.js:1:19308)
at b (/var/task/.next/server/app/patients/[userId]/register/page.js:1:46676)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /var/task/.next/server/app/patients/[userId]/register/page.js:1:3374