将dart升级到2.7时,webdev中出现错误

问题描述 投票:0回答:2

我正在尝试将Web应用程序从2.52迁移到2.7,但是,在没有太多信息的情况下会引发很多错误。问题似乎升级了build_runner和build_web_compilers。从2.6开始,它必须使用莳萝文件进行编译,并且这种编译类型不适用于我的项目。

webdev版本:2.5.4

这里是日志:

MacBook-Pro-de-Jonathan-941:guaraci jonathanrezende$ dart --version
Dart VM version: 2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "macos_x64"
MacBook-Pro-de-Jonathan-941:guaraci jonathanrezende$ webdev --version
2.5.4
MacBook-Pro-de-Jonathan-941:guaraci jonathanrezende$ sudo webdev serve web:80 --hostname guara.ci
[INFO] Building new asset graph completed, took 3.8s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[INFO] Serving `web` on http://guara.ci
[INFO] Generating SDK summary completed, took 3.5s
[SEVERE]build_web_compilers:ddc on package:oni_services_components/src/communication_message.ddc.module: Error compiling dartdevc module:oni_services_components|lib/src/communication_message.ddc.js

Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/oni_forms.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/oni_forms.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/base.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/base.scss.css.shim.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/base.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/batch_form.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/batch_form.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/editor/base.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/editor/base.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/editor/editor.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/editor/editor.scss.css.shim.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/editor/editor.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/error.scss.css.shim.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/footer.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/footer.scss.css.shim.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/footer.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/form.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/form.scss.css.shim.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/form.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/group.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/group.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/object_form.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/object_form.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/paginated_form.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/paginated_form.template.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/submit.dart'.
Error: Could not resolve the package 'oni_forms' in 'package:oni_forms/src/submit.template.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/oni_objector.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/oni_objector.template.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/src/field_desc.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/src/field_desc.scss.css.shim.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/src/field_desc.template.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/src/object.dart'.
Error: Could not resolve the package 'oni_objector' in 'package:oni_objector/src/object.template.dart'.

[WARNING]build_web_compilers:entrypoint on web/main.dart: Unable to read oni_services_components|lib/src/communication_message.ddc.js, check your console or the `.dart_tool/build/generated/oni_services_components/lib/src/communication_message.ddc.js.errors` log file.
[SEVERE]build_web_compilers:ddc on package:oni_inputs/oni_inputs.template.ddc.module: Error creating oni_inputs|lib/oni_inputs.template.ddc.dillError creating kernel summary for module:oni_inputs|lib/oni_inputs.template.ddc.dill

Response:--dart-sdk-summary=file:///Users/jonathanrezende/Dart/current/lib/_internal/ddc_sdk.dill --output=/private/tmp/scratch_spacenF5cNh/packages/oni_inputs/oni_inputs.template.ddc.dill --packages-file=file:///tmp/kernel_builder_jpDCb2/.packages --multi-root-scheme=org-dartlang-app --exclude-non-sources --summary-only --target=ddc --libraries-file=file:///Users/jonathanrezende/Dart/current/lib/libraries.json --reuse-compiler-result --use-incremental-compiler --used-inputs=/tmp/kernel_builder_FBcKpI/used_inputs.txt --input-summary=org-dartlang-app:///packages/angular/src/bootstrap/modules.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/utils/id_generator/id_generator.ddc.dill --input-summary=org-dartlang-app:///packages/oni_front_common/oni_front_common.template.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_input/material_input_default_value_accessor.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/laminate/components/modal/modal.ddc.dill --input-summary=org-dartlang-app:///packages/angular/src/runtime/proxies.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_input/material_input.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/dynamic_component/dynamic_component.template.ddc.dill --input-summary=org-dartlang-app:///packages/oni_common/oni_common.ddc.dill --input-summary=org-dartlang-app:///packages/oni_front_common/src/config.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/angular_components.template.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_input/material_auto_suggest_input.template.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_input/base_material_input.ddc.dill --input-summary=org-dartlang-app:///packages/angular/src/runtime/queries.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_select/material_select.ddc.dill --input-summary=org-dartlang-app:///packages/angular/src/runtime/text_binding.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/focus/focus.template.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/src/material_tooltip/tooltip_controller.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/utils/angular/reference/reference.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/utils/browser/dom_service/dom_service.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/model/selection/selection_container.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/interfaces/has_disabled.ddc.dill --input-summary=org-dartlang-app:///packages/oni_services/src/action.ddc.dill --input-summary=org-dartlang-app:///packages/angular/angular.template.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/mixins/material_dropdown_base.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_input/material_auto_suggest_input.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/material_input/deferred_validator.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/src/laminate/popup/popup_hierarchy.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/utils/disposer/disposer.ddc.dill --input-summary=org-dartlang-app:///packages/angular_forms/src/directives.ddc.dill --input-summary=org-dartlang-app:///packages/angular/angular.ddc.dill --input-summary=org-dartlang-app:///packages/angular/src/core/change_detection/change_detection.ddc.dill --input-summary=org-dartlang-app:///packages/angular_components/model/ui/
dart angular-dart
2个回答
0
投票

您在.packages文件中看到oni_forms吗?看来您有一些缺少依赖关系而不是build_web_compilers问题的软件包的新版本。


0
投票

发现了。是深层相关软件包之间的循环依赖性。

我猜想旧的DDC会让这种情况发生,因为即使以为包是循环的,文件也不是。现在,莳萝的东西不允许在包装级别上发生这种情况。

© www.soinside.com 2019 - 2024. All rights reserved.