You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
appwrite init function
? What would you like to name your function? My Awesome Function
? What ID would you like to have for your function? unique()
? What runtime would you like to use? Node.js (node-16.0)
✓ Success
Deploy it
appwrite deploy function
? Which functions would you like to deploy? My Awesome Function (6501316f90f0917826da)
ℹ Info Deploying function My Awesome Function ( 6501316f90f0917826da )
ℹ Info Ignoring files using configuration from appwrite.json
✓ Success Deployed My Awesome Function ( 6501316f90f0917826da )
✓ Success Deployed 1 functions
Execute function from dashboard
Go to: Functions > My Awesome Function > Execute now > Execute (with default path="/" method="GET")
NOTE: I have tried creating a function with Node and Python and they both fail in similar ways. Python can't find the appwrite package like it wasn't pip installed.
👍 Expected behavior
Function return:
If envs are set
{areDevelopersAwesome: true}
If envs are not set
"Environment variables are not set. Function cannot use Appwrite SDK."
👎 Actual Behavior
STAUS FAILED:
Could not load code file.
Error: Cannot find module 'node-appwrite'
Require stack:
/usr/local/server/src/function/src/index.js
/usr/local/server/src/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at Module.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:93:18)
at Object. (/usr/local/server/src/function/src/index.js:1:13)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
🎲 Appwrite version
1.4.x
💻 Operating system
Linux
🧱 Your Environment
CLI
appwrite -v
2.0.2
Appwrite version [1.4.2]
👀 Have you spent some time to check if this issue has been raised before?
Unfortunately, that every time you redeploy from CLI that command gets removed. I'm guessing there's some confit with the appwrite.json config. Even when I explicitly add:
👟 Reproduction steps
Create the basic template function
Deploy it
Execute function from dashboard
Go to: Functions > My Awesome Function > Execute now > Execute (with default path="/" method="GET")
NOTE: I have tried creating a function with Node and Python and they both fail in similar ways. Python can't find the appwrite package like it wasn't pip installed.
👍 Expected behavior
Function return:
If envs are set
{areDevelopersAwesome: true}
If envs are not set
"Environment variables are not set. Function cannot use Appwrite SDK."
👎 Actual Behavior
STAUS FAILED:
Could not load code file.
Error: Cannot find module 'node-appwrite'
Require stack:
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at Module.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:93:18)
at Object. (/usr/local/server/src/function/src/index.js:1:13)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
🎲 Appwrite version
1.4.x
💻 Operating system
Linux
🧱 Your Environment
CLI
Appwrite version [1.4.2]
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: