Back

Error when pushing a Function to self-hosted server

  • 0
  • Self Hosted
  • Functions
Cord
22 Jan, 2025, 10:53

I have a self-hosted instance of Appwrite 1.6.0 with two working functions created and deployed back in the Appwrite 0.x days. I've since updated Appwrite CLI to 6.1.0 and reinitialized my project so that I can locally develop a new function using appwrite init function. I'm using the dart-3.5 runtime for the new function and am ready to push it to the server. However, I get the following when running appwrite push functions:

TypeScript
? Which functions would you like to push? API (api)
Info: Validating functions ...
Info: Checking for changes ...
Info: Pushing functions ...
ErrorAPI (api)                      • Invalid `runtime` param: Value must be one of (node-14.5, node-16
Error: No functions were pushed.

If I run docker compose exec appwrite vars on the server, I can see the following:

TypeScript
- _APP_FUNCTIONS_RUNTIMES=dart-2.17,dart-2.18,dart-3.1,dart-3.3,dart-3.5

I have no reference to any Node runtimes, either locally or on my server. How do I resolve this issue?

TL;DR
There's an error pushing a Dart function to a self-hosted Appwrite server. The CLI is expecting Node.js runtimes, but the server only has Dart runtimes configured. To fix this, you can edit the `_APP_FUNCTIONS_RUNTIMES` environment variable on the server to include `node-14.5` or `node-16`.
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