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

Can't locate Dart SDK #56942

Closed
ds797 opened this issue Oct 23, 2024 · 2 comments
Closed

Can't locate Dart SDK #56942

ds797 opened this issue Oct 23, 2024 · 2 comments
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. closed-as-intended Closed as the reported issue is expected behavior triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@ds797
Copy link

ds797 commented Oct 23, 2024

dart run isn't locating my Flutter SDK.
From the base project directory, when I run dart run build_runner build, or even dart run on it's own, I get the following error:

Because (name) depends on flutter_test from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.

I ran flutter pub run build_runner build, which didn't give the same error. However, I'd like to use dart run since flutter pub run is deprecated. Why can't Dart find the Flutter SDK?

Stack Overflow question link (has more information): question

  • Dart version and tooling diagnostic info (dart info):

General info

Project info

  • sdk constraint: '>=3.5.0-56.0.dev <4.0.0'
  • dependencies: flutter, hive, isar_flutter_libs, path_provider
  • dev_dependencies: flutter_lints, flutter_test

Process info

Memory CPU Elapsed time Command line
66 MB 0.0% 01:49:42 dart devtools --machine --allow-embedding --dtd-uri ws:/uri
561 MB 0.1% 01:49:42 dart language-server --protocol=lsp --client-id=VS-Code --client-version=ver
81 MB 0.0% 01:49:42 dart tooling-daemon --machine
76 MB 0.1% 01:49:42 flutter_tools.snapshot daemon
  • Whether you are using Windows, macOS, or Linux (if applicable):
    Linux (Arch)
@dart-github-bot
Copy link
Collaborator

Summary: The user is experiencing an issue where dart run cannot locate the Flutter SDK, resulting in a dependency resolution error. They have confirmed that flutter pub run works, but they prefer to use dart run as flutter pub run is deprecated.

@dart-github-bot dart-github-bot added area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 23, 2024
@a-siva a-siva added the closed-as-intended Closed as the reported issue is expected behavior label Oct 24, 2024
@a-siva
Copy link
Contributor

a-siva commented Oct 24, 2024

Standalone 'dart' does not make any assumptions about the presence of a flutter sdk for the commands that it supports.
We cannot have 'dart' look for the presence of a Flutter SDK.

@a-siva a-siva closed this as completed Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. closed-as-intended Closed as the reported issue is expected behavior triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants