grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
860 stars 271 forks source link

example/grpc-web fails to build main.dart.js #515

Closed Mahfuzur-Rahman-Masud closed 3 years ago

Mahfuzur-Rahman-Masud commented 3 years ago
webdev 2.7.4 'webdev serve web:9000' as instructed in the readme file of grpc-web doesn't work, because main.dart.js is missing. 'webdev build' fails to produce main.dart.js --> with following complain: "[WARNING] build_web_compilers:entrypoint on web/main.dart: Skipping compiling grpc_web|web/main.dart with dart2js because some of its transitive libraries have sdk dependencies that are not supported on this platform:" "grpc|lib/src/shared/status.dart grpc|lib/src/server/call.dart" Above 2 files contain imports from **'dart.io'** which causes the failure. When I remove reference to dart.io from above 2 files, build succeeds. ## Repro steps 1. step1: Clone grpc-dart 2. step2 : cd grpcdart/example/grpc-web 3. step3 webdev build or webdev serve web:9000 with: webdev 2.7.4
mraleph commented 3 years ago

Thanks for the report and sorry for the breakage. I have published 3.0.2 that fixes the problem.