[英]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.