Skip to content

Puro dart commands fail and dart unable to detect Flutter SDK #147

Description

@Vonarian
puro dart run build_runner build --delete-conflicting-outputs                                                                  255 ✘  11:26:09 
Resolving dependencies in `/Users/vonar/PetaProc/joow/frontend`... 
Because joow depends on flutter_test from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.

Flutter users should use `flutter pub` instead of `dart pub`.

The issue rrousselGit/riverpod#4416 is not due to dot-shorthands or generators, but how the dart executable "detects" things in 3.38.1 (Latest Flutter Stable as of now with Dart 3.10.0).

Using flutter pub works fine, while dart pub and dart run fail, even puro dart run fails.
prefs.json:

{
  "defaultEnvironment": "lts",
  "lastUpdateCheck": "2025-11-17T10:29:59.210931",
  "legacyPubCache": false
}

A puro reinstall, an envs reinstall, puro gc, modifying dart and flutter scripts, none of them help

Activity

  1. Vonarian commented on Nov 17, 2025

    @Vonarian
    Author

    With log-level=4:

    puro --log-level=4 dart run build_runner build --delete-conflicting-outputs                               255 ✘  11:40:43 
    [D] envPuroRoot: /Users/vonar/.puro
    [D] binPuroRoot: null
    [D] firstRun: false
    [D] legacyPubCache: null
    [V] Started waiting for lock on /Users/vonar/.puro/prefs.json
    [V] Waiting for lock on /Users/vonar/.puro/prefs.json took 1ms
    [D] puroRootDir: LocalDirectory: '/Users/vonar/.puro'
    [D] puroRoot (resolved): LocalDirectory: '/Users/vonar/.puro'
    [D] PURO_FLUTTER_BIN: null
    [D] target: PuroBuildTarget.macosX64
    [D] Platform.executable: puro
    [D] Platform.resolvedExecutable: /Users/vonar/.puro/bin/puro
    [D] Platform.script: file:///Users/vonar/PetaProc/joow/frontend/puro
    [D] Platform.packageConfig: null
    [D] No package root: Platform.packageConfig is null
    [D] packageRoot: null
    [D] executablePath: /Users/vonar/.puro/bin/puro
    [D] scriptPath: /Users/vonar/.puro/bin/puro
    [D] scriptExtension: 
    [D] installationType: PuroInstallationType.distribution
    [D] version: 1.4.11
    [V] Checking if update is available
    [V] Started waiting for lock on /Users/vonar/.puro/latest_version
    [V] Waiting for lock on /Users/vonar/.puro/latest_version took 0ms
    [D] lastNotification: null
    [D] latestVersion: 1.4.11
    [D] isOutOfDate: false
    [D] willNotify: false
    [D] shouldVersionCheck: false
    [D] lastVersionCheck: 2025-11-17 10:29:59.210931
    [V] Started waiting for lock on /Users/vonar/.puro/envs/lts/prefs.json
    [V] Waiting for lock on /Users/vonar/.puro/envs/lts/prefs.json took 0ms
    [D] [git 31438] /Users/vonar/.puro/envs/lts/flutter> git show HEAD:bin/internal/engine.version
    [D] [git 31438] finished with exit code 0 in 46ms
    [D] flutterCache.engineVersion: b5990e5ccc5e325fd24f0746e7d6689bbebc7c65
    [D] flutterConfig.engineVersion: b5990e5ccc5e325fd24f0746e7d6689bbebc7c65
    [V] Started waiting for lock on /Users/vonar/.puro/envs/lts/update.lock
    [V] Waiting for lock on /Users/vonar/.puro/envs/lts/update.lock took 0ms
    [D] [git 31442] /Users/vonar/.puro/envs/lts/flutter> git rev-parse HEAD
    [D] git: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
    [D] [git 31442] finished with exit code 0 in 39ms
    [D] flutterCommit: b45fa18946ecc2d9b4009952c636ba7e2ffbb787
    [V] Started waiting for lock on /Users/vonar/.puro/envs/lts/update.lock
    [V] Waiting for lock on /Users/vonar/.puro/envs/lts/update.lock took 0ms
    [V] Setting up dart took 89ms
    [D] > sysctl -n hw.optional.arm64
    [D] sysctl finished in 30ms
    [D] sysctl: 1
        
    [D] querying arch of /Users/vonar/.puro/envs/lts/flutter/bin/cache/dart-sdk/bin/dart
    [D] > file /Users/vonar/.puro/envs/lts/flutter/bin/cache/dart-sdk/bin/dart
    [D] file finished in 16ms
    [D] file: /Users/vonar/.puro/envs/lts/flutter/bin/cache/dart-sdk/bin/dart: Mach-O 64-bit executable arm64
        
    [D] file result: /Users/vonar/.puro/envs/lts/flutter/bin/cache/dart-sdk/bin/dart: Mach-O 64-bit executable arm64
        
    [D] [arch 31445] > /usr/bin/arch -arch arm64 /Users/vonar/.puro/envs/lts/flutter/bin/cache/dart-sdk/bin/dart run build_runner build --delete-conflicting-outputs
    Resolving dependencies in `/Users/vonar/PetaProc/joow/frontend`... 
    Because joow depends on flutter_test from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.
    
    Flutter users should use `flutter pub` instead of `dart pub`.
    
    [D] [arch 31445] finished with exit code 255 in 54ms
    
  2. DarkHeros09 commented on Nov 17, 2025

    @DarkHeros09

    same issue, honestly i though i was the only one having this issue, i reverted back to 3.35.7.

  3. moved this from Backlog to Bugs in triageon Nov 27, 2025
  4. FMorschel commented on Jan 22, 2026

    @FMorschel

    @pingbird, noting that the team is planning on removing pub run, so this would be even more important:

  5. hectorAguero commented on May 22, 2026

    @hectorAguero

    Please give priority to this one. Without dart run build_runner build working for https://pub.dev/packages/build_runner, using Puro is almost as troublesome as using FVM.

    At least I was able to use flutter pub run build_runner build after I added FLUTTER_ROOT to my PATH file.

    export FLUTTER_ROOT="$HOME/.puro/envs/default/flutter" # Added manually for Puro (temporary)

    And and alias to make it simple to run

    alias drb="flutter pub run build_runner build"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Bugs

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions