尝试使用我的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
答案 0 :(得分:0)
您是否尝试访问“http://localhost:8080/browser_test.html' ?
列出目录时, pub serve
会列出。除非存在index.html
,否则您应该获得404。