Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Not found: 'dart:ffi' with flutter web

Read carefully before reporting.

My flutter web project was working perfectly fine. A few hours later, it started complaining about 'dart:ffi: which i didn't even import. I saw similar questions but none of them were in my case. I tried everything I could find but nothing worked. Here are the errors:

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/drift-1.7.1/lib/src/sqlite3/database_tracker.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-1.8.0/lib/src/ffi/api/database.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-1.8.0/lib/src/ffi/api/statement.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-1.8.0/lib/open.dart:5:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
...
                                          
Failed to compile application.
Exited (sigterm)

I couldn't include the entire debug console's output but these are the top and bottom lines. Please help, thank you.

like image 932
Mamoudou Kane Avatar asked Jan 24 '26 19:01

Mamoudou Kane


1 Answers

In my case, import 'dart:ffi' was added to my project automatically, probably by my IDE. I just searched with the search function of my IDE and I delete the import.

like image 114
Spixz Avatar answered Jan 26 '26 09:01

Spixz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!