Flutter Web因无法打开文件client.js而崩溃 [英] Flutter Web crashes with Cannot open file client.js

查看:82
本文介绍了Flutter Web因无法打开文件client.js而崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问您有关此错误的帮助这是在我第一次尝试使用flutter run -d chrome运行我的Flutter Web时发生的

May I ask your help about this error It's happen when I'm trying for the first time running my flutter web which using flutter run -d chrome

Launching lib\main.dart on Chrome in debug mode...
Syncing files to device Chrome...                                       
25,220ms (!)
GET /dwds/src/injected/client.js
Error thrown by handler.
FileSystemException: Cannot open file, path = 'C:\Users\Acer\flutter\.pub-cache\hosted\pub.dartlang.org\dwds-2.0.1\lib\src\injected\client.js' (OS Error: The system cannot find the path specified.
, errno = 3)
dart:isolate  _RawReceivePortImpl._handleMessage

如果我尝试使用

flutter run -d web

它没有引发任何错误,但是在网站上变成空白,没有任何显示.无论如何,谢谢您的帮助

It's doesn't thrown any error but on the website it goes blank white nothing shown up. Anyway thanks for your help

推荐答案

在pubspec.yaml中添加以下内容对我有用.我正在使用Beta频道.

adding the following in the pubspec.yaml worked for me. I am using beta channel.

dependencies:
dwds: ^7.1.1

然后运行命令:

flutter update-packages

这篇关于Flutter Web因无法打开文件client.js而崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆