
I am getting a cannot find module error when executing a function on the console. I am at the root of the project folder - with following structure.
- appwrite.json
- functions/functionName/src/index.js
Running command from terminal as below -
“appwrite functions createDeployment \
--functionId=idReplaced \
--activate=true \
--entrypoint="funtionName/src/index.js" \
--code="." “
Error as below :
Error: Cannot find module '/usr/code-start/functionName/src/index.js'
Require stack:
“ - /usr/local/src/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15) “

What is the correct "entrypoint" value in the command to point to the code

I got it working now. Since, I had only one function, the function name looked selected in the command line & I could not figure out that it was not. I had to select it using the "space" key. Once this is done, the function started working fine.
Recommended threads
- createJWT: The requested route was not f...
Hi team, I'm currently working on the SDK for Node.js using Appwrite to build an API for my server. I am following the documentation for the account/jwt - http...
- Show execution status 500 unable to set ...
I want to set the labels at the time user signup to my application , all things work , users data save in auth, updateprefs set , a verification email sent , bu...
- Using a local package inside of a cloud ...
Hey all I am trying to understand if what I want is possible or I am looking at it wrong. I am trying to use the a local package inside of my Dart cloud functi...
