Back

⚡ Facing issues with Appwrite cloud functions

  • 0
  • Databases
  • Functions
  • Web
  • Cloud
Akash Srinivasan
27 Jun, 2024, 12:43

Hey, on execution appwrite is not able to access the node-appwrite module for some reason.

TypeScript
Could not load code file.
Error: Cannot find module 'node-appwrite'
Require stack:
- /usr/local/server/src/function/main.js
- /usr/local/server/src/server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/usr/local/server/src/function/main.js:1:34)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
TL;DR
Appwrite cloud functions encountering "Cannot find module 'node-appwrite'" error. Issue lies in accessing the node-appwrite module. Solution: Ensure node-appwrite module is correctly installed and accessible in the specified path.
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