How do I disable the stagehand template when creating a web flutter project?

Asked

Viewed 182 times

0

I’ve tried to disable using the command pub global deactivate stagehand , however I cannot create any project if this template is not enabled. Vscode asks if you want to activate it using the command pub global activate stagehand.

With this template enabled, I get the following error message :

Unable to run Stagehand. Stagehand exited with code 65. stagehand 3.3.2 doesn’t support Dart 2.3.0-dev.0.5. flutter-a1668566e5.

When executing the flutter doctor -v, I receive the data below:

[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [versão 6.1.7601], locale pt-BR)
    • Flutter version 1.5.4-hotfix.2 at c:\flutter
    • Framework revision 7a4c33425d (10 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\abel\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Java\jdk1.8.0_211\bin\bin\java
    X Cannot execute C:\Program Files\Java\jdk1.8.0_211\bin\bin\java to determine the version

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[√] VS Code (version 1.36.0)
    • VS Code at C:\Users\abel\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.2.0

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

Any idea ?

  • Hey, Abel! When did you install Flutter, has time or was also today?

  • Recently I had to remove Dart and also Vscode.. but flutter had been installed for some time yes.

  • Ah, yes. You even took a look at my answer?

  • I did, George.. I haven’t been able to validate it yet.. but I’ll test it by activating the stagehand for the version I have of Dart and see if it works. Working I give you a Ok. Thank you.

1 answer

0

The error message says that Stagehand 3.3.2 does not support Dart version 2.3.0, which is the one you have installed. Looking at the Github pubspec of Stagehand, I saw that the minimum version of Dart is 2.4.0.

You could update the Dart version with the command:

flutter upgrade

Another option would be to use an older version of Stagehand with support for the version of Dart you already have installed, which in this case could be 3.2.0. For this, you can use the following command:

pub global activate stagehand 3.2.0
  • Unfortunately, it didn’t work.. After trying to create a new project, Dart prompts you to update to the latest version. " Stagehand needs to be updated with 'pub global Activate stagehand' to use this Feature."

  • @Abelsouzamagalhaes in this case, if you upgrade flutter and Dart, you can already use the latest version of stagehand, according to the Docs. (I haven’t gotten to testing here yet)

  • George, unfortunately, it didn’t work out.. I upgraded Dart to version 2.4 .. and then to version 2.5 (dev) and still has the same error. Very much the community is not reporting this error.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.