aqueduct icon indicating copy to clipboard operation
aqueduct copied to clipboard

Problems with aqueduct commands after flutter upgrade

Open cmalbuquerque opened this issue 3 years ago • 12 comments

I cannot use the following aqueduct commands after upgrade flutter to v1.25.0-8.3 with Dart version 2.12.0 on beta channel:

  • aqueduct serve (reported on this issue)
  • aqueduct db generate

To launch aqueduct server I have been using dart bin/main.dart command to run my specifications defined on main.dart file and it works. But I can't find any way of generate a new database without aqueduct db generate command.

cmalbuquerque avatar Feb 01 '21 21:02 cmalbuquerque

@cmalbuquerque same here. I am also not able to run aqueduct db generate

91priyansh avatar Feb 04 '21 11:02 91priyansh

I found a solution to aqueduct db generate if you want to continue using the beta channel. Although I think that's a bad practice, it works!

  1. switch to flutter stable channel
  2. develop the data model
  3. execute aqueduct db generate in order to create a migration
  4. execute aqueduct db upgrade
  5. switch again to flutter beta channel

I am using Postgres database and I also had to add dependency overrides in pubspec.yaml file:

dependency_overrides:
  postgres: ^2.1.1

As I mentioned above, this is a temporary solution and I think this problem must be solved with other better solution.

cmalbuquerque avatar Feb 04 '21 16:02 cmalbuquerque

@cmalbuquerque Thanks.. let me try this solution

91priyansh avatar Feb 04 '21 17:02 91priyansh

you need to install Dart for your machine, not use dart flutter, flutter executes his own dart version

jairoFernandez avatar Feb 08 '21 19:02 jairoFernandez

I had same problem and I found the solution at is on https://github.com/stablekernel/aqueduct/issues/946

First I create a path (/user/****/.pub-cache/bin) for flutter dart. So every time I update stable version my path always see the dart path. Than I use “dart pub global activate aqueduct” to get aqueduct. Now its working perfectly.

NTMS2017 avatar Feb 10 '21 06:02 NTMS2017

@cmalbuquerque Hello!

I switched to the flutter stable channel, tried to run aqueduct db generate, but got the following error: error

Any suggestion? Thanks in advance!

SzAttila97 avatar Feb 25 '21 10:02 SzAttila97

Hi @SzAttila97!

Try to run flutter upgrade before aqueduct db generate to ensure you have the latest version.

cmalbuquerque avatar Feb 25 '21 11:02 cmalbuquerque

Hey! @cmalbuquerque !

After that, I got kinda the same error, but with different version in the error message. 😥 error

SzAttila97 avatar Feb 25 '21 11:02 SzAttila97

@SzAttila97 try to run flutter clean before aqueduct db generate and make sure that your flutter version in pubspec.yaml file is the same version than your flutter channel

cmalbuquerque avatar Feb 25 '21 11:02 cmalbuquerque

@cmalbuquerque Done, but got the same error, im so confused! version sdk_version error

SzAttila97 avatar Feb 25 '21 11:02 SzAttila97

@SzAttila97 I have no idea how to solve your problem. Check this issue on flutter's repository that mentioned the same error.

cmalbuquerque avatar Feb 25 '21 12:02 cmalbuquerque

@cmalbuquerque Alright, thanks anyway. By the way the method you mentioned at the beggining of the post (changing the channels) still working for you? Or maybe there was some changes connected with the channels?

SzAttila97 avatar Feb 25 '21 12:02 SzAttila97