実現したいこと
google_sign_inパッケージを追加したflutterアプリをgithubにプッシュした際に自動的にデプロイする。
発生している問題・分からないこと
flutterアプリの開発を行おうとしています。main.dartは何も変えずに、パッケージでgoogle_sign_inを使いたいのですが、これを追加すると、githubでの自動デプロイ前のビルド時に4000行ほどのエラーが出てしまいます。原因がわかる方がいたら、ご教授いただければ幸いです。
エラーメッセージ
error
1長いので省略しています。 2Compiling lib/main.dart for the Web... 3Target dart2js failed: ProcessException: Process exited abnormally with exit code 1: 4../../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/dom/accelerometer.dart:52:45: 5Error: The type 'JSObject' can't be used as supertype. 6class AccelerometerReadingValues implements JSObject *** 7 ^ 8../../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/dom/ambient_light.dart:22:44: 9Error: The type 'JSObject' can't be used as supertype. 10class AmbientLightReadingValues implements JSObject *** 11 ^ 12../../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/dom/anchors.dart:11:27: 13Error: The type 'JSObject' can't be used as supertype. 14class XRAnchor implements JSObject *** 15 ^ 16../../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/dom/anchors.dart:21:30: 17Error: The type 'JSObject' can't be used as supertype. 18class XRAnchorSet implements JSObject *** 19 ^ 20../../../.pub-cache/hosted/pub.dev/web-0.3.0/lib/src/dom/angle_instanced_arrays.dart:11:41: 21Error: The type 'JSObject' can't be used as supertype. 22class ANGLE_instanced_arrays implements JSObject *** 23(中略) 24<asynchronous suspension> 25#10 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:200:5) 26<asynchronous suspension> 27#11 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1389:27) 28<asynchronous suspension> 29#12 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19) 30<asynchronous suspension> 31#13 CommandRunner.runCommand (package:args/command_runner.dart:212:13) 32<asynchronous suspension> 33#14 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:355:9) 34<asynchronous suspension> 35#15 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19) 36<asynchronous suspension> 37#16 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:295:5) 38<asynchronous suspension> 39#17 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:119:9) 40<asynchronous suspension> 41#18 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19) 42<asynchronous suspension> 43#19 main (package:flutter_tools/executable.dart:90:3) 44<asynchronous suspension> 45 46Compiling lib/main.dart for the Web... 12.5s 47Error: Failed to compile application for the Web. 48Error: Process completed with exit code 1.
該当のソースコード
pubspec.yaml
1dependencies: 2 flutter: 3 sdk: flutter 4 5 6 # The following adds the Cupertino Icons font to your application. 7 # Use with the CupertinoIcons class for iOS style icons. 8 cupertino_icons: ^1.0.2 9 firebase_core: ^2.24.2 10 firebase_auth: ^4.16.0 11 provider: ^6.1.1 12 # google_sign_inでエラーが出る! 13 google_sign_in: ^6.0.2
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
エラーメッセージの一部を検索してみましたが、jsのインポート文を消去した等の記述しか見当たりませんでした。
また、google_sign_inのバージョンを6.2.1、6.1.6、6.0.2と変更してみましたが、解決できませんでした。
補足
特になし
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。