Closed mcmah309 closed 1 week ago
Some similar started to happens in my side. When I run jaspr create project myproject
I'm getting errors with flutter sdk version:
✓ Generated 25 file(s) (0.8s)
✗ [CLI] [ERROR] The current Dart SDK version is 3.3.4. (1.8s)
[CLI] [ERROR]
[CLI] [ERROR] Because jaspr_lints >=0.1.1 depends on custom_lint_builder 0.6.5 which depends on analyzer ^6.6.0, jaspr_lints >=0.1.1 requires analyzer ^6.6.0.
[CLI] [ERROR] And because analyzer >=6.6.0 <6.9.0 depends on macros >=0.1.2-main.3 <0.1.3, jaspr_lints >=0.1.1 requires macros >=0.1.2-main.3 <0.1.3 or analyzer ^6.9.0.
[CLI] [ERROR] And because macros >=0.1.0-main.0 requires SDK version >=3.4.0-256.0.dev <4.0.0 and analyzer >=6.8.0 depends on collection ^1.19.0, jaspr_lints >=0.1.1 requires collection ^1.19.0.
[CLI] [ERROR] So, because collection >=1.19.0 requires SDK version ^3.4.0 and myproject depends on jaspr_lints ^0.1.1, version solving failed.
✗ [CLI] (10.0s)
Shutting down...
Created project myproject! In order to get started, run the following commands:
cd myproject
jaspr serve
jaspr doctor:
[✓] Jaspr CLI (Version 0.15.1)
• Dart Version 3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on "linux_x64" at /home/nestor/bin/flutter-sdk/bin/cache/dart-sdk/bin/dart
• Running on linux Linux 6.10.11-1-default #1 SMP PREEMPT_DYNAMIC Thu Sep 19 07:33:24 UTC 2024 (bd33620) - Locale es_CO.UTF-8
• Analytics: Enabled
[✓] Current Project
• Dependencies on core packages:
• jaspr: ^0.15.1
• jaspr_builder: ^0.15.1 (dev)
• jaspr_web_compilers: ^4.0.10 (dev)
• jaspr_router: ^0.5.1
• Rendering mode: client
• Uses jaspr compilers: true
• Uses flutter embedding: false
I updated the sdk constraint of jaspr_lints
, so you will get a better error message. This will be released with the next version.
Description
When creating a new project, if you have an unsupported Dart version, commands like
jaspr build
may fail without warning why. The example below shows a scenario like this. The solution is to use Dart3.5.0
but nowhere is this enforced or warned about.Example In Dart
3.4.0
If you havepubspec.yaml
You will get
After removing
jaspr_lints
doctor for example