Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Dart library 'dart:js_interop' is not available on this platform. #2371

Closed
isaanyoha opened this issue Jan 30, 2025 · 1 comment
Closed

Comments

@isaanyoha
Copy link

Please why are my getting this error [see the error below] when I did not explicitly called 'dio_web_adapter' package in my pubspec.yml? I am only using package dio (upgrade from dio: ^5.3.2 to dio: ^5.8.0+1, but issue still persists)

---------THE ERROR-------
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 260.8s
Failed to build iOS app
Error (Xcode): ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/adapter.dart:3:8: Error: Dart library 'dart:js_interop' is not available on this platform.

Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).

---------I TRIED-------
I am trying to build for iphone is yet I get that the error above:

I have tried:
rm -rf .dart_tool
rm -rf .flutter-plugins
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/.pub-cache

...but build keeps failing and showing the error above

---------MY pubspec.yml-------
sdk: ">=3.0.0 <4.0.0"

dependencies:
dio: ^5.3.2

Thank you!

Copy link
Contributor

@isaanyoha Infra and blank issues are only available for moderators. You're apparently using the wrong issue template.

Infra 和空白 issue 仅供管理人员使用,请选择其他 issue 模板创建 issue。

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2025
@github-actions github-actions bot locked as off-topic and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant