升级到dart 1.9.1后未找到main.dart

升级到dart 1.9.1后未找到main.dart,dart,Dart,自从我升级到Dart 1.9.1以来,每当我试图通过单击在Dartium中运行或作为JavaScript运行来运行我的main.Dart时,我在浏览器控制台上就会出现此错误 Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/main.dart Failed to load resource: the server responded with a

自从我升级到Dart 1.9.1以来,每当我试图通过单击在Dartium中运行或作为JavaScript运行来运行我的
main.Dart
时,我在浏览器控制台上就会出现此错误

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/main.dart
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/main.dart.js
我试着运行我自己的
bin/server.dart
,所以我不依赖pub服务器来提供静态文件。根据这个脚本,到达web文件夹的方向通常是
“./web”
,我必须将其更改为
“web”
,这样才能工作

我不知道有什么变化吗?这是虫子吗

编辑 我在Dartium上也收到了这个消息

您正在使用不受支持的命令行标志:--无沙盒。稳定与安全将受到影响

更新


目录问题可能是因为在Shelf或Redstone中进行了更改或更新。我按照建议进行了发布更新,这可能会改变框架查找文件夹的方式。

问题似乎是您试图将应用程序(服务器端)作为网站运行。 如果您按下运行图标旁边的图标,并在下拉菜单中单击“管理启动”,您可以单击图标左侧(服务器图标),从而运行命令行应用程序


如果您在此处选择dart脚本(server.dart或main.dart),您就可以使用它。

尝试删除
.pub
文件夹并运行
pub cache repair
@GünterZöchbauer谢谢,但运气不好。
--no sandbox
警告只是让您意识到您使用的浏览器不安全(请参阅)它是什么样的应用(角度、省道、聚合物)?如果你回到以前的Dart版本,你能试着找出错误是否消失了吗?您可以尝试删除
~/.pub缓存
目录。有些问题无法通过
pub cache repair
修复。我删除了我的
ÀppData/Roaming/pub/cache
文件夹(windows),它通常在发生类似情况时工作。还有我的
.pub
文件夹,但我仍然收到相同的错误。我创建了一个新的uberlysimplewebapp,它工作正常。这个错误是由于对
main.dart
资源的http GET请求造成的。