请求页面时,“pub serve test”会抛出错误

时间:2018-03-20 03:46:53

标签: dart

尝试使用我的dart项目运行pub serve test会给我以下消息:

Loading source assets...
Loading dart_to_js_script_rewriter transformers...
Serving mud test on http://localhost:8080
Build completed successfully

但是,当我加载http://localhost:8080时,收到以下消息:

[test] GET  → Could not find asset mud|test.

这是我的目录结构:

.
├── CHANGELOG.md
├── README.md
├── analysis_options.yaml
├── build
│   └── ...
├── lib
│   └── ...
├── pubspec.lock
├── pubspec.yaml
├── test
│   ├── browser_test.dart
│   ├── browser_test.html
│   └── encounter_test.dart
└── web
    ├── favicon.ico
    ├── index.html
    ├── main.dart
    └── styles.css

1 个答案:

答案 0 :(得分:0)

您是否尝试访问“http://localhost:8080/browser_test.html' ?

列出目录时,

pub serve会列出。除非存在index.html,否则您应该获得404。