情景
当我想使用命令进行打包时报错
具体报错提示:
Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use 'dart compile js' instead.
我的打包命令是:
flutter build web --web-renderer html --release
解决方案
首先要确定是不是代码本身有报错,如果依赖的包内有代码报错也是报这个错误。
我这种就是本身代码没有报错。
终端运行: flutter clean
然后运行: flutter pub get
就解决了