Skip to content

pub finished with exit code 255 #1915

Closed

Description

@ZaferAlemdaroglu

=>flutter pub global list
devtools 0.2.4

=>flutter pub global deactivate devtools
Deactivated package devtools 0.2.4.

=>flutter pub global activate devtools
Downloading.......
Precompiling executables...
Precompiled devtools:devtools.
Installed executable devtools.
Activated devtools 0.2.4.

=>flutter pub global run devtools

Unhandled exception:
Invalid argument(s): A directory corresponding to fileSystemPath "...Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.2.4/build" could not be found

#0      createStaticHandler (package:shelf_static/src/static_handler.dart:50:5)
#1      defaultHandler (package:devtools_server/src/external_handlers.dart:41:23)
<asynchronous suspension>
#2      serveDevTools (package:devtools_server/src/server.dart:211:21)
#3      serveDevToolsWithArgs (package:devtools_server/src/server.dart:149:10)
#4      main (file:///Users/zaferyasinalemdaroglu/Desktop/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.2.4/bin/devtools.dart:9:3)
#5      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
#6      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
pub finished with exit code 255

Activity

  1. suztomo commented on May 6, 2020

    @suztomo

    In my observation 0.2.3 has "build" directory while 0.2.4 does not:

    [email protected] ~/Documents/hitomemo
    ~/Documents/hitomemo $ ls /Users/suztomo/development/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.2.4
    CHANGELOG.md README.md    devtools.iml pubspec.yaml
    LICENSE      bin          lib
    [email protected] ~/Documents/hitomemo
    ~/Documents/hitomemo $ ls /Users/suztomo/development/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.2.3 
    CHANGELOG.md README.md    build        pubspec.yaml
    LICENSE      bin          lib
    

    Picking up devtools 0.2.3 solved my problem.

    flutter pub global deactivate devtools
    flutter pub global activate devtools '<=0.2.3'
    
  2. ZaferAlemdaroglu commented on May 6, 2020

    @ZaferAlemdaroglu
    Author

    Thanks @suztomo

    Be careful about that VS Code always uses pub for DevTools and not flutter.

    For terminal fix;

    flutter pub global deactivate devtools
    flutter pub global activate devtools '<=0.2.3'
    

    For VS Code fix;

    ~/flutter/bin/cache/dart-sdk/bin/pub global deactivate devtools
    ~/flutter/bin/cache/dart-sdk/bin/pub global activate devtools '<=0.2.3'
    
  3. j0nscalet commented on May 6, 2020

    @j0nscalet

    +1, that's the case for me as well. @suztomo suggestions resolved the issue for me.

  4. devoncarew commented on May 6, 2020

    @devoncarew
    Contributor

    Thanks for the reports - you should be able to just use pub global activate devtools now (w/o having to downgrade the version).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions