I try to create a cloud function, where I have following folder structure:
.
|-lib/
-main.dart
|-.appwrite/
|-pubspec.yaml
|-pubspec.lock
After manuel deployment via the appwrite console (cloud) I get this error:
Error: Couldn't resolve the package 'dart_appwrite' in 'package:dart_appwrite/dart_appwrite.dart'.
server.dart:37:27: Error: Method not found: 'start'.
await user_code.start(request, response);
Where does user_code come from?
Any other things I made wrong?
Your code gets merged with our runtime code. See https://github.com/open-runtimes/open-runtimes/blob/801c6a833aec4ec72fc8562b5dffba2b3967ed6b/runtimes/dart-2.17/server.dart#L37
I highly recommend using the Appwrite CLI to initialize your function code: https://appwrite.io/docs/functions#gettingStarted
This gives you a good working foundation to start with
[SOLVED] Cloud Functions: Dart-2.17
Recommended threads
- Bug: Cloud Function On Schedule Didn't R...
Heya I have a cloud function with this cron `0 17 * * *` to run at 9AM PT every day. I have not touched this since I set it up, and it has been working fine s...
- functions
Code for function not being created in Github. Permissions are set correctly, repository is created, however no code is in the created repository. Just trying...
- Error 400: redirect_uri_mismatch
Hi team, Google OAuth was working fine with our Appwrite Cloud setup until yesterday. We did not change any configuration in Appwrite, Google Cloud, or our cod...