
Hello, I can't run the function in appwrite.
I searched the forum and have tried to insert type : module
in package.json
. But I still can't get the function to work.
TypeScript
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'node-appwrite' imported from /usr/local/server/src/function/index.js
at new NodeError (node:internal/errors:372:5)
at packageResolve (node:internal/modules/esm/resolve:910:9)
at moduleResolve (node:internal/modules/esm/resolve:959:20)
at defaultResolve (node:internal/modules/esm/resolve:1176:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:605:30)
I attached my folder structure, and how I imported the function.
Could you help me please.
TL;DR
Cannot find package 'node-appwrite' when trying to run a function in appwrite. Developers tried inserting `type : module` in `package.json` but still facing issues. Error message indicates package not found. Solution: Make sure 'node-appwrite' is installed in the project directory using npm or yarn.
Here's my package.json too
Recommended threads
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attributes Problem - Cloud
I am not able to see the attribute columns and their context on cloud. Can you help?
- Authorization header not working in Appw...
I have an Appwrite function that takes a custom bearer token as authentication. The function works fine locally when I test it with `appwrite run functions`, bu...
