
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
- Bypass Error When Creating Account With ...
Suppose user first uses email/pass for log in using xyz@gmail.com, few month later on decides to use google oauth2 with same xyz@gmail.com (or in reverse orde...
- dart function very slow
sometimes waiting too long, about 3mins to 5mins, sometimes very fast, not build time, just execute, anyway to speed up?
- wrong code for google oauth2 ?
gives User (role: guests) missing scope (account) error
