VeryGoodOpenSource / very_good_cli

A Very Good Command-Line Interface for Dart created by Very Good Ventures šŸ¦„
http://cli.vgv.dev
MIT License
2.19k stars 195 forks source link

Unable to execute the newly created project using vgv_cli. #82

Closed NaagAlgates closed 3 years ago

NaagAlgates commented 3 years ago

Description I was able to successfully create a project using vgv cli. After opening the created project in Vs Code, I get 216 errors.

Steps To Reproduce

  1. Create a project using cli
  2. open it in vs code

Expected Behavior The expected behaviour is to get an executable project without any errors and in an executable condition.

Screenshots

Error1 Error2 Error3 Error4

Additional Context When I tried to run the pug upgrade command, I get the following message

[my_first_project_using_vgv_cli] flutter pub upgrade
Running "flutter pub upgrade" in my_first_project_using_vgv_cli...     
The current Dart SDK version is 2.10.5.

Because my_first_project_using_vgv_cli requires SDK version >=2.12.0-0 <3.0.0, version solving failed.
pub upgrade failed (1; Because my_first_project_using_vgv_cli requires SDK version >=2.12.0-0 <3.0.0, version solving failed.)
exit code 1

My Flutter Doctor is:

Doctor summary (to see all details, run flutter doctor -v):

[āœ“] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-IN)

[āœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[āœ“] Xcode - develop for iOS and macOS (Xcode 12.3)
[!] Android Studio (version 4.1)
    āœ— Flutter plugin not installed; this adds Flutter specific functionality.
    āœ— Dart plugin not installed; this adds Dart specific functionality.
[āœ“] VS Code (version 1.53.2)
[āœ“] Connected device (2 available)

! Doctor found issues in 1 category.

Please let me know what I'm missing here.

felangel commented 3 years ago

Hi @NaagAlgates šŸ‘‹ Thanks for opening an issue!

Because the generated project uses null safety, please make sure to use the beta channel:

$ flutter channel beta
$ flutter upgrade

Hope that helps šŸ‘

felangel commented 3 years ago

@NaagAlgates we updated the documentation to specify that the generated code requires the beta channel due to null safety. If after switching channels you're still having trouble let us know and we're happy to help šŸ‘