Related issues
This is related to dart compile failing in such scenario. Maybe this issue should belong to the firebase tools project, sorry if that is indeed the case.
Releated issues:
Version info
Dart SDK: dart 3.12
firebase_functions: 0.6.0
firebase cli: 15.19
Test case
Simply add a dependency (even as a transitive dependency) that requires build_hooks (such as sqlite3)
Steps to reproduce
- Generate a project using
firebase init functions
- Add sqlite3 as a dependency
- Call firebase deploy:
firebase deploy --only functions
Expected behavior
It should deploy
Actual behavior
i functions: compiling Dart to linux-x64 executable...
Error: Dart compilation failed with exit code 255. Make sure your Dart project compiles successfully with: dart compile exe bin/server.dart --target-os=linux --target-arch=x64
And indeed:
$ dart compile exe bin/server.dart --target-os=linux --target-arch=x64
'dart compile' does not support build hooks, use 'dart build' instead.
Packages with build hooks: sqlite3.
Were you able to successfully deploy your functions?
No and I could not find any workaround as in my case sqlite3 is added by a transitive dependency...
It seems that the check for hook is only made for binaries in the bin folder but unfortunately: Firebase Functions for Dart expects your main function in bin/server.dart.
Related issues
This is related to dart compile failing in such scenario. Maybe this issue should belong to the firebase tools project, sorry if that is indeed the case.
Releated issues:
dart compile exechecks for build hooks for scripts outsidebindart-lang/sdk#62593Version info
Dart SDK: dart 3.12
firebase_functions: 0.6.0
firebase cli: 15.19
Test case
Simply add a dependency (even as a transitive dependency) that requires build_hooks (such as sqlite3)
Steps to reproduce
firebase init functionsfirebase deploy --only functionsExpected behavior
It should deploy
Actual behavior
And indeed:
Were you able to successfully deploy your functions?
No and I could not find any workaround as in my case sqlite3 is added by a transitive dependency...
It seems that the check for hook is only made for binaries in the
binfolder but unfortunately:Firebase Functions for Dart expects your main function in bin/server.dart.