[英]Angular Dart Import Error With Tracing.dart
I am using Angular Dart for a project. 我正在为项目使用Angular Dart。 In my pubspec.yaml I have 在我的pubspec.yaml中
dependencies:
browser: any
angular: "^1.1.2+2"
shadow_dom: any
json_object: any
bootjack: any
crypto: any
xml: "^2.3.2"
transformers:
- angular
for my dependencies. 对于我的依赖。 When I run my program in Dartium I get the error 在Dartium中运行程序时,出现错误
The requested built-in library is not available on Dartium.'package:angular/tracing.dart': error: line 9 pos 1: library handler failed
import "dart:developer";
^: package:angular/tracing.dart
I never reference or use anything out of the tracing.dart so I'm not sure why this is causing an error. 我从不引用或使用tracing.dart中的任何内容,因此我不确定为什么会导致错误。
The tracing package is directly using dart:profiler
, which was deprecated and now removed. 跟踪包直接使用dart:profiler
,已弃用,现在将其删除。 You can now use dart:developer
instead, both libraries are compatible. 现在,您可以改用dart:developer
,这两个库都兼容。
I would suggest to fork the package, replace dart:profiler
with dart:developer
(no other changes are required) and send a pull request. 我建议分叉该软件包,将dart:profiler
替换为dart:developer
(不需要其他更改)并发送请求请求。 I already forked and fixed the package some time ago here , but I think the original package is inactive so I didn't created an PR. 我已经在这里分叉并修复了该软件包,但是我认为原始软件包无效,因此我没有创建PR。 You can use my fork by adding this to your pubspec.yaml: 您可以通过将其添加到pubspec.yaml中来使用我的fork:
dependency_overrides:
tracing:
git: https://github.com/Fox32/tracing.dart.git
dart:profiler
was recently renamed to dart:developer
. dart:profiler
最近更名为dart:developer
。 One of your dependencies probably use an analyzer version that doesn't fit to your Dart version. 您的依赖项之一可能使用的分析器版本与Dart版本不匹配。
See also https://github.com/dart-lang/pub/issues/1345 另请参阅https://github.com/dart-lang/pub/issues/1345
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.