I have a dart_frog server code running on a Google Cloud - Compute Engine instance. I have used stormberry as the ORM for my postgres DB which generates code using build_runner
.
Now, the issue is that, when I run dart run build_runner build --delete-conflicting-outputs
, it returns the following error:
Building package executable... (44:35.0s)
Built build_runner:build_runner.
Invoked Dart programs must have a 'main' function defined:
https://dart.dev/guides/language/language-tour#a-basic-dart-program
The thing is this was running absolutely fine a couple of days ago and I have been able to generate code previously. I just made a minor tweak in the business logic and pushed it to the server. I have been encountering this issue since then.
build_runner: ^2.3.3
Dart SDK version: 2.19.6 (stable) (Unknown timestamp) on "linux_x64"
The same code works fine in my personal laptop though. I tried cloning the project again as well as deleting the .dart_tool
folder and running dart pub get
and dart pub cache repair
but the issue still persists.