获取 ScriptCompactor 错误,无法内联导入文件

Getting a ScriptCompactor Error, failing to inline import a file

我正在处理的应用程序曾经发现,我做了一个发布升级,它坏了,所以我正在恢复。我清除了缓存,还原了应用程序,并做了一个 pub get。

我注意到这个错误已经弹出并且未能得到解决。

[Error from ScriptCompactor on seg_ui|web/index.html]:
line 7, column 3 of web\index.html: Failed to inline HTML import: Could not find asset polymer_elements|lib/iron_flex_layout/classes/iron_flex_layout.html.
null
<link rel="import" href="packages/polymer_elements/iron_flex_layout/classes/iron_flex_layout.html">
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Build completed with 1 errors.
[web] GET index.html => Could not find asset seg_ui|web/index.html.

我正在查看它引用的文件 index.html,并按预期看到了该行。我试图将其注释掉,但没有用。我将其删除以查看会发生什么,似乎我收到了一堆关于未找到大量其他聚合物资产的警告。

示例:

[web] GET packages/polymer_elements/iron_resizable_behavior.dart => Could not find asset polymer_elements|lib/iron_resizable_behavior.dart.

[Warning from ImportInliner on seg_ui|web/index.html]:
line 10, column 1 of lib\components\dialog\dialog.html: Failed to inline HTML import: Could not find asset polymer_elements|lib/neon_animation/animations/slide_from_right_animation.html.
null
<link rel="import" href="../../../../packages/polymer_elements/neon_animation/animations/slide_from_right_animation.html">
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

有人可以解释为什么会发生这种情况以及解决它的步骤吗?似乎由于某种原因,我的所有资产都没有被正确理解。

作为旁注:当我去我的 pubspec 时,去获取所有内容都是最新的。如果我尝试修复,它似乎可以修复,但少数文件具有 HandshakeException: Connection terminated during Handshake.

pub upgrade 破坏应用程序时,通常是由项目的 .pub 子目录中的无效缓存引起的。

删除此文件夹是安全的。之后再 运行 pub getpub upgrade