gpt4 book ai didi

dart - 断言未通过pub serve执行

转载 作者:行者123 更新时间:2023-12-03 04:05:00 25 4
gpt4 key购买 nike

以下代码无法执行:

assert((){ print('hi'); });

终端日志:
pub serve
Loading source assets...
Loading angular2 and dart_to_js_script_rewriter transformers...
Serving checkoutFrontEduzz web on http://localhost:8080
Build completed successfully
[web] GET Served 11 cached assets.
[web] GET Served 634 cached assets.
[web] GET Served 2 cached assets.
[web] GET assets/css/hotsite.component.css.map → (cached) checkoutFrontEduzz|web/assets/css/hotsite.component.css.map

我的发布规范:
transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
- 'package:angular2/common.dart#FORM_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: web/main.dart
resolved_identifiers:
BrowserClient: 'package:http/browser_client.dart'
Client: 'package:http/http.dart'
- dart_to_js_script_rewriter

Chrome 和with的睾丸。

最佳答案

要在Dartium中获取断言错误,您需要确保其在启用检查模式的情况下运行

DART_FLAGS='--checked' path/chrome

另请参阅 https://webdev.dartlang.org/tools/dartium
pub serve会产生生产输出,因为据我所知,调试输出的运行速度太慢,因此,您的预期行为是您不会在Chrome中看到错误。您需要运行 pub build --mode="debug"并在Chrome中加载输出以获取错误。

关于dart - 断言未通过pub serve执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42487942/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com