Search code examples
dartread-eval-print-loop

Cannot start Repl


I am trying to install a repl for Dart according to the page https://pub.dev/packages/repl

After dart pub global activate repl I got the following error message:

$ drepl
The Dart VM service is listening on http://127.0.0.1:8181/V3ekGjDx3nQ=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/V3ekGjDx3nQ=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FV3ekGjDx3nQ%3D%2Fws
2.18.7 (stable) (Thu Jan 12 10:44:08 2023 +0000) on "macos_x64"
Type `exit()` or Ctrl-d to quit.
Unhandled exception:
Instance of 'InvalidPathResult'
#0      repl (package:repl/repl.dart:36:5)
<asynchronous suspension>
#1      wrappedMain (file:///Users/gefei/.pub-cache/hosted/pub.dartlang.org/repl-0.1.0+2/bin/main.dart:18:3)
<asynchronous suspension>

What is wrong?


Solution

  • Unfortunately, there's no obvious fix for this exception. Also, package:repl is no longer maintained and the author is recommending users take a look at package:interactive instead, so you might have more luck trying that package instead.