Skip to content
Back

Cannot find package 'node-appwrite'

  • 0
  • Functions
  • Cloud
Said H
18 Feb, 2024, 05:34

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.
Said H
18 Feb, 2024, 05:35

Here's my package.json too

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more