pwa icon indicating copy to clipboard operation
pwa copied to clipboard

TypeError: Cannot read property 'apply' of undefined

Open philippmay3r opened this issue 5 years ago • 2 comments

Dart Version: 2.5.2 PWA Version: 0.2.0

Hi, I have a problem with my AngularDart project. I want use this as pwa, but there is this one bug and I don't know what this means. Did I something wrong? Or is this a general bug?

main.dart: void main() { new pwa.Client(); runApp(ng.AppComponentNgFactory,createInjector: injector); }

pwa.dart: void main() { Worker worker = new Worker(); worker.offlineUrls = offline.offlineUrls; worker.run(version: offline.lastModified); }

image

philippmay3r avatar Oct 09 '19 11:10 philippmay3r

Is this while running via dartdevc? People reported that dart2js compilation works fine, while ddc usually does not work.

isoos avatar Oct 09 '19 17:10 isoos

No, I build it with dart2js.

My build.yaml looks like this:

targets: $default: builders: angular_components|scss_builder: enabled: True build_web_compilers|entrypoint: # These are globs for the entrypoints you want to compile. generate_for: - test/.browser_test.dart - web/.dart options: compiler: dart2js # List any dart2js specific args here, or omit it. dart2js_args: #- -O2 #- --minify - --fast-startup

MayaTimer avatar Oct 09 '19 17:10 MayaTimer