[SOLVED]Appwrite cloud functions failing on creating Executions with the client sdk
- 1
- Functions
- Web
- Cloud

i was trying to use appwrite cloud functions with my next.js project, using the client sdk and i was getting this error from my appwrite function execution tab

Are you using client side SDK in the function? 👀

yes…i am using the client side sdk in the function

You can't/shouldn't

Also functions need to follow a custom structure


As D5 mentioned, you must always use Server-Side SDKs for Appwrite Cloud Functions.
Functions are run on the server-side either with an API key or a JWT.

i have tried to run from server-side now but here's the error i am getting trying to execute my functions from Appwrite cloud
Error: Cannot find module '/usr/local/server/src/function/src/main.js'
Require stack:
- /usr/local/server/src/server.js
at Module._resolveFilename (node:internal/modules/cjs/loader:939: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/cjs/helpers:102:18)
at execute (/usr/local/server/src/server.js:123:28)
at /usr/local/server/src/server.js:158:33
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)```

How are you deploying the function ?

I recommend through CLI

i am deploying through Git

was the above error caused by using the Git to deploy?

Usually not, but selected an incorrect main file

Or it's not readable/faulty

okay…thanks @D5 and @safwan i think it’s been solved already

[SOLVED]Appwrite cloud functions failing on creating Executions with the client sdk
Recommended threads
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
- [bug] API response is good but UI don't ...
Hi guys! When i got my object, it have billingInfo relation, in the web ui i just got pading state, and the row shows object is null, but when i work whit this...
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
