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
- Google Auth not working in a React App
Authentication with Google has failed. It redirects back to the signin route in React. Attached screenshots for configuration of Google console and Appwrite Go...
- How to display images from storage
I tried the link above, but it returns the error “`Please upgrade to a higher plan.`” I don’t need Transformations at the moment, I just want to display the ima...
- Cant sign up for appwrite cloud. Never s...
Cant sign up for appwrite cloud. Never sends me an email verification