Rank 1: Thread
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) “