Skip to content

Flutter entry scripts in lib/web are incorrectly considered Dart-web #2690

@sma

Description

@sma

I get this error after the Dart-code (or Flutter-code) plugin wanted to update the webdev package:

Unhandled exception:
ProcessException: ***OUT***

***ERR***
The Flutter SDK is not available.

***
  Command: /Users/sma/Work/flutter/bin/cache/dart-sdk/bin/pub deps
�[38;5;248m#0      _runPubDeps  (package:webdev/src/pubspec.dart:70:5)�[39;49m
�[38;5;248m#1      PubspecLock.read  (package:webdev/src/pubspec.dart:84:11)�[39;49m
�[38;5;248m#2      readPubspecLock  (package:webdev/src/command/shared.dart:63:39)�[39;49m
�[38;5;248m#3      DaemonCommand.run  (package:webdev/src/command/daemon_command.dart:68:29)�[39;49m
�[38;5;248m#4      CommandRunner.runCommand�[39;49m
�[38;5;248m#5      _CommandRunner.runCommand  (package:webdev/src/webdev_command_runner.dart:38:24)�[39;49m
�[38;5;248m#6      CommandRunner.run.<anonymous closure>�[39;49m
�[38;5;244m#7      new Future.sync  (dart:async/future.dart:223:31)�[39;49m
�[38;5;248m#8      CommandRunner.run�[39;49m
�[38;5;248m#9      run  (package:webdev/src/webdev_command_runner.dart:19:56)�[39;49m
�[38;5;248m#10     main�[39;49m
�[38;5;244m#11     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:299:32)�[39;49m
�[38;5;244m#12     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:168:12)�[39;49m

Exited (255)

I'm using Visual Studio Code 1.47.3 with Dart/Flutter code 3.13.0 on macOS 10.15.6

I'm using:

$ flutter --version
Flutter 1.21.0-6.0.pre.141 • channel master • https://github.com/flutter/flutter.git
Framework • revision c748f1a7aa (8 hours ago) • 2020-07-31 17:45:18 -0700
Engine • revision 280bbfc763
Tools • Dart 2.10.0 (build 2.10.0-2.0.dev bd528bfbd6)

Because that version of Flutter includes a full version of Dart, I have no separate Dart SDK installed.

For some reason, the webdev package wants to run the pub command from the cached Dart SDK which fails. Upon further inspection, this could be a problem with that package but it occurs because this plugin wanted to install webdev and I'm now stuck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions