繁体   English   中英

PWA Worker使用AngularDart引发错误

[英]PWA Worker throws an error with AngularDart

我正在尝试将离线功能添加到有角飞镖项目中,并运行pub build但是

Running pub build:pub.exe build
-----
Unhandled exception:
ProcessException: The system cannot find the file specified.
Command: pub.exe build
#0      _buildProjectIfEmptyOrOld (http://localhost:52940/pwa.dart:116)
<asynchronous suspension>
#1      main (http://localhost:52940/pwa.dart:40)
<asynchronous suspension>
#2      _startIsolate.<anonymous closure> (dart:isolate-
patch/isolate_patch.dart:263)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-
patch/isolate_patch.dart:151)

主镖

import 'package:angular/angular.dart';
import 'package:my_app/views/app_component/app_component.dart';
import 'package:pwa/client.dart' as pwa;

void main() {
    bootstrap(AppComponent);

    // register PWA ServiceWorker for offline caching.
    new pwa.Client();
}

pubspec.yaml

dependencies:
     pwa: ^0.1.2

那时, pwa正在尝试运行pub.exe build 我还没有在Windows上尝试过它,只有一个朋友报告说它可以工作,但是pub.exe完全有可能不再起作用(如果有的话),并且应该一直都是pub (在这种情况下,是Windows相关的错误)。

建议的解决方法:

  • 运行pub build
  • 运行pub run pwa
  • 再次运行pub build

如果上述方法有效,请告诉我,我将在补丁程序版本中对其进行修复。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM