flutter_js icon indicating copy to clipboard operation
flutter_js copied to clipboard

Cannot find dart.ffi

Open sunilguptasg opened this issue 2 years ago • 9 comments

Merely adding import 'package:flutter_js/flutter_js.dart';

results in a long list of errors starting with : Error: Not found: 'dart:ffi' ../…/lib/javascript_runtime.dart:3 import 'dart:ffi';

even including ffi: ^1.1.2 in pubspec.yaml does not help.

sunilguptasg avatar Dec 22 '21 17:12 sunilguptasg

which Flutter/Dart version are you trying to use?

abner avatar Feb 12 '22 11:02 abner

Same thing happening for me.

Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.67.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

alexaung avatar Jun 06 '22 16:06 alexaung

On what platform are you trying to run your app?

shilangyu avatar Nov 05 '22 16:11 shilangyu

Hello, same problem here ^^

this is a fresh install of android studio with the latest stable version 3.3.9 of flutter

I am trying to compile on the web

Flutter 3.3.9 • channel stable • https://github.com/flutter/flutter.git Framework • revision b8f7f1f986 (2 weeks ago) • 2022-11-23 06:43:51 +0900 Engine • revision 8f2221fbef Tools • Dart 2.18.5 • DevTools 2.15.0

thx you !! :)

fighter777 avatar Dec 09 '22 14:12 fighter777

It's been a year since I first reported the issue. Do not remember what I did other than stop using flutter_js.dart...

sunilguptasg avatar Dec 09 '22 17:12 sunilguptasg

It's been a year since I first reported the issue. Do not remember what I did other than stop using flutter_js.dart...

what did you use to replace flutter_js?

fighter777 avatar Dec 09 '22 17:12 fighter777

Could you post some reproduction steps?

shilangyu avatar Dec 09 '22 17:12 shilangyu

I compiled to a web version with the example https://github.com/abner/flutter_js/tree/master/example/lib

I think the problem comes from the example which is planned for a mobile version.

"import 'dart:io'; " is not supported by a web build

by the way, there is an error in the example because there is no flutter_js_example package ^^

import 'package:flutter/material.dart'; import 'package:flutter_js/flutter_js.dart'; --> import 'package:flutter_js_example/ajv_example.dart';

fighter777 avatar Dec 09 '22 18:12 fighter777

I do not remember - but I do now use this:

https://pub.dev/packages/universal_io

sunilguptasg avatar Dec 09 '22 18:12 sunilguptasg