Skip to content
Back

Hi, I am trying to deploy a function from github, but it shows this error:

  • 0
  • Flutter
fabiolin
8 Aug, 2025, 11:21

2025-08-08T10:57:38.692443793Z Compiling ... 2025-08-08T10:57:39.652983250Z src/server.dart:6:8: Error: Error when reading '../build/lib/main.dart': No such file or directory 2025-08-08T10:57:39.653042950Z import 'package:open_runtimes_dart_function/main.dart' as user_code; 2025-08-08T10:57:39.653048818Z ^ 2025-08-08T10:57:39.653052760Z src/server.dart:133:23: Error: Method not found: 'main'. 2025-08-08T10:57:39.653057050Z user_code.main(context), 2025-08-08T10:57:39.653061387Z ^^^^ 2025-08-08T10:57:39.653065150Z src/server.dart:143:36: Error: Method not found: 'main'. 2025-08-08T10:57:39.653069403Z output = await user_code.main(context); 2025-08-08T10:57:39.653073268Z ^^^^ 2025-08-08T10:57:39.656043237Z Error: AOT compilation failed 2025-08-08T10:57:39.656217045Z Bad state: Generating AOT kernel dill failed! 2025-08-08T10:57:44.000000000Z Build archive was not created.

If I run it locally, it works fine

TL;DR
Developers trying to deploy a function from GitHub are encountering errors like 'No such file or directory' and 'Method not found'. The issue seems to be with AOT compilation failing during deployment but working fine locally.
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