Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work out of the box - lots of errors #78

Open
Stephen-Cronin opened this issue Feb 13, 2025 · 2 comments
Open

Doesn't work out of the box - lots of errors #78

Stephen-Cronin opened this issue Feb 13, 2025 · 2 comments

Comments

@Stephen-Cronin
Copy link

I downloaded it, extracted it, opened it in VS code, then ran flutter pub get. That reported that "103 packages have newer versions incompatible with dependency constraints" so perhaps that is part of the problem?

Anyway there were a bunch of errors in the code (330 problems), such as Undefined name 'prefsProvider', Undefined name 'secureStorageProvider', Undefined name 'routerProvider' etc in main.dart. Every file in the features and services folder has some sort of error. Only utils and widgets are okay.

I then ran flutter pub upgrade and that updated 70 packages, but still reported "44 packages have newer versions incompatible with dependency constraints". The errors remained.

I ran dart run build_runner build but that comes up with [SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.. There's no build folder in the dummymart\.dart_tool folder, so maybe that's the problem?

So something is pretty wrong here. Maybe it is something wrong with my setup? Or maybe I missed a step in setting it up? Hope I just missed something.

Flutter doctor in case that helps (let me know if you want the -v version):

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.4, on Microsoft Windows [Version 10.0.19045.5371], locale en-AU)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.4)
[√] Android Studio (version 2022.2)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.97.1)
[√] Connected device (4 available)
[√] Network resources
@dhafinrayhan
Copy link
Owner

dhafinrayhan commented Feb 16, 2025

Hi, thanks for reporting the issue! I wasn't able to reproduce the issue, though I did some updates to the dependency constraints (as well running the project on the latest Flutter stable version) and it runs correctly. That being said, from my experience, the X packages have newer versions incompatible with dependency constraints should not be causing the issue.

The .dart_tool is supposed to be generated after you run build_runner, and it's ignored by version control so it's not included in the repo. According to some SO answers, they got it working by either doing flutter pub cache clean or upgrading packages that cause the problem (I did, so hopefully if that's the problem it means it should be fixed now).

Please let me know if you can get it working!

@Ryandl80
Copy link

Ryandl80 commented Mar 1, 2025

Hi, I'm also having problems with package dependencies. A previous installation of dummymart was working but I recently tried a fresh git clone dummymart.

flutter pub get
Resolving dependencies...
Note: test_api is pinned to version 0.7.3 by flutter_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.
Because no versions of test match >1.25.15 <2.0.0 and test 1.25.15 depends on test_api 0.7.4, test ^1.25.15 requires test_api
0.7.4.
And because every version of flutter_test from sdk depends on test_api 0.7.3, test ^1.25.15 is incompatible with flutter_test
from sdk.
So, because dummymart depends on both flutter_test from sdk and test ^1.25.15, version solving failed.
Failed to update packages.

I'm trying to sort out the problem. I'm using Flutter version 3.27.4. Can you let me know what flutter version you are using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants