
file:///usr/local/server/src/function/src/main.js:1 import { Client, ID ,Users} from 'node-appwrite'; ^^ SyntaxError: The requested module 'node-appwrite' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export. For example: import pkg from 'node-appwrite'; const { Client, ID ,Users} = pkg; at ModuleJob._instantiate (internal/modules/esm/module_job.js:98:21) at async ModuleJob.run (internal/modules/esm/module_job.js:137:5) at async Loader.import (internal/modules/esm/loader.js:162:24) at async execute (/usr/local/server/src/server.js:126:32) at async /usr/local/server/src/server.js:158:13

what version of appwrite are you on?

FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.
Recommended threads
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
- Permissions for bulk operation
Hi team, I have a question: “In the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
