Aqueduct db generate error: Bad state: NoSuchMethodError: The getter 'length' was called on null
It's a bug and it's still there. Happens when there is a previous migration file.
Just erase migrations/00000001_initial.migration.dart
and then aqueduct db generate
will work as expected.
Tested on Aqueduct 4.0.0-b1
p.s. I know it's the same solution given in the question but I was having the same problem and the solution wasn't clear at first.
You can try to downgrade the Dart version.
brew tap dart-lang/dartbrew uninstall dartbrew install dart@2.8
It helped me.
UPDATED:
Here is the content of my pubspec.yaml
file:
name: mysecurenamedescription: mysecuredescriptionversion: 0.1.0environment: sdk: ">=2.7.0 <3.0.0"dependencies: aqueduct: ^4.0.0-b1 analyzer: '>=0.32.0 <0.41.0' runtime: ^1.0.0-5 http: ^0.12.0+4 mime: ^0.9.6+3dev_dependencies: test: ^1.0.0 aqueduct_test: ^2.0.0-b1