无法编译 Web 应用程序

Mar*_*nce 6 dart firebase flutter google-cloud-firestore flutter-web

我正在尝试在网络上构建并运行 flutter firebase 项目,但是我一次又一次地收到此错误。我已将我的项目添加到 firebase 并已在 index.html 文件中添加了必要的详细信息,但仍然收到错误。这是详细的 -

[   +7 ms] Done persisting file store
[   +7 ms] Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use    
'dart compile
           js' instead.

../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_messaging_web-2.4.4/lib/src/internals.dart:2:1:     
           Error: Error when reading
           '../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/internals.dart':    
Error reading
           '../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/internals.dart'     
(The system
           cannot find the file specified.
           )
           export 'package:firebase_core/src/internals.dart' hide guardWebExceptions;
           ^

../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_messaging_web-2.4.4/lib/src/internals.dart:6:8:     
           Error: Error when reading
           '../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/internals.dart':    
Error reading
           '../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/internals.dart'     
(The system
           cannot find the file specified.
           )
           import 'package:firebase_core/src/internals.dart' as internals;
                  ^

../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_messaging_web-2.4.4/lib/src/internals.dart:11:20:   
           Error: Method not found: 'guardWebExceptions'.
             return internals.guardWebExceptions(
                              ^^^^^^^^^^^^^^^^^^
           Error: Compilation failed.

[  +16 ms] Compiling lib\main.dart for the Web... (completed in 10.7s)
[   +1 ms] "flutter web" took 11,811ms.
[   +6 ms] Exception: Failed to compile application for the Web.
           #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #11     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>


[ +159 ms] ensureAnalyticsSent: 153ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[   +1 ms] exiting with code 1
Run Code Online (Sandbox Code Playgroud)

小智 1

我更新了我的 Firebase 相关包并解决了类似的问题。