Dart Error: import of dart:mirrors is not supported in the current Dart runtime
frankmungnodev opened this issue · comments
Description
import of dart:mirrors is not supported in the current Dart runtime
Expected behavior
should work without any issues.
Current behavior
after import meilisearch in data module.
Screenshots or Logs
E/flutter ( 6594): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime
E/flutter ( 6594): [ERROR:flutter/runtime/dart_isolate.cc(143)] Could not prepare isolate.
E/flutter ( 6594): [ERROR:flutter/runtime/runtime_controller.cc(385)] Could not create root isolate.
Restarted application in 2,146ms.
Environment (please complete the following information):
- OS: Kubuntu
- Meilisearch version: 0.7.0
- meilisearch-dart version:
I'm so sorry to see this error happening. It was definitely not supposed to :/
Can you provide me the Dart version you're using?
No need. I confirm the bug.
During the implementation of the latest features, I used a library called dart:mirrors
to improve the code quality of the library. Still, I could not confirm by the docs if they were supported by all the platforms we wanted to adopt.
I'll fix it ASAP.
Hi @frankmungnodev @JanKubicek @kostasoft @ArAmM7 again, I'm sorry about the last version. I'm looking for automated ways to prevent that from happening.
I just released the new version 0.7.1
, which is the replacement of 0.7.0
you can now use it with flutter and web platforms (again).
Hello @brunoocasali I was about to use the 0.7.1
but the same error happens. The dart sdk version I use currently is 2.19.1
. I run flutter clean
and flutter pub add
but seems not work.
This time the error look like this
E/flutter (17766): [ERROR:flutter/shell/common/shell.cc(89)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime E/flutter (17766): [ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate. E/flutter (17766): [ERROR:flutter/runtime/runtime_controller.cc(417)] Could not create root isolate. E/flutter (17766): [ERROR:flutter/shell/common/shell.cc(606)] Could not launch engine with configuration.
Hi, @frankmungnodev that's incredibly weird because there is no dart:mirrors
being imported in the code anymore.
I think your 0.7.0 version is in your cache, and flutter clean
, as I understood, clean the flutter build cache.
So what you can try is to force in the pubspec.yaml
adding the new version dependencies: meilisearch: "0.7.1"
.
And you may want to clear your cache with: dart pub cache clean
like this:
➜ meilisearch-dart git:(main) dart pub cache clean
This will remove everything inside /Users/bruno/.pub-cache.
You will have to run `dart pub get` again in each project.
Are you sure? (y/N)? y
Removing pub cache directory /Users/bruno/.pub-cache.
Hi @brunoocasali I clear cache with dart pub cache clean
and its work now. Thank you