[英]PWA Worker throws an error with AngularDart
I am trying to add offline capabilities to an angular dart project, running pub build
but 我正在尝试将离线功能添加到有角飞镖项目中,并运行
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)
main.dart 主镖
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 pubspec.yaml
dependencies:
pwa: ^0.1.2
At that point, the pwa
is trying to run pub.exe build
. 那时,
pwa
正在尝试运行pub.exe build
。 I haven't tried it on Windows, only a friend reported it working, but it is entirely possible that pub.exe
does no longer work (if it ever did), and it should have been pub
all along (and in this case it is a Windows-related bug). 我还没有在Windows上尝试过它,只有一个朋友报告说它可以工作,但是
pub.exe
完全有可能不再起作用(如果有的话),并且应该一直都是pub
(在这种情况下,是Windows相关的错误)。
Suggested workaround: 建议的解决方法:
pub build
pub build
pub run pwa
pub run pwa
pub build
again pub build
If the above works, let me know, and I'll fix it in a patch release. 如果上述方法有效,请告诉我,我将在补丁程序版本中对其进行修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.