Skip to content

Dart 2.18.7 issue with pub #206

Description

@dustinlessard-wf

If you run a codemod and haven't performed a pub-get beforehand, the codemod will attempt to pub-get. By default, we can no longer run 'pub get' and instead must run 'dart pub get'. (Or setup an alias)

Running the codemod in this instance produces this error:

dustinpauze@WF17853 wdesk_sdk % dart pub global run over_react_codemod:intl_message_migration
Building package executable... 
Built over_react_codemod:intl_message_migration.
[WARNING] codemod found no files
[WARNING] orcm.logging: ^ Ignore the "codemod found no files" warning above for now.
^ Ignore the "codemod found no files" warning above for now.
[INFO] orcm.intl_message_migration: Running `pub get` if needed so that all Dart files can be resolved...
Running `pub get` if needed so that all Dart files can be resolved...
[INFO] orcm.pubspec: Running `pub get` in `/Users/dustinpauze/Workiva/wdesk_sdk`...
Running `pub get` in `/Users/dustinpauze/Workiva/wdesk_sdk`...
No preset version installed for command pub
Please install a version by running one of the following:

asdf install dart 2.18.7

or add one of the following versions in your config file at /Users/dustinpauze/.tool-versions
dart 2.13.4
Unhandled exception:
Exception: pub get failed with exit code: 126
#0      runPubGet (package:over_react_codemod/src/util/package_util.dart:76:5)
<asynchronous suspension>
#1      runPubGetIfNeeded (package:over_react_codemod/src/util/package_util.dart:43:5)
<asynchronous suspension>
#2      pubGetForAllPackageRoots (package:over_react_codemod/src/executables/intl_message_migration.dart:324:5)
<asynchronous suspension>
#3      main (package:over_react_codemod/src/executables/intl_message_migration.dart:171:3)
<asynchronous suspension>

Activity

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