I need to install a service worker in my Angular 6 application.
I run the following command:
ng add @angular/pwa --project fire
but after some times no service worker is added and this is the result:
@angular/[email protected] updated 1 package and audited 36760 packages in 11.742s found 0 vulnerabilities
Installed packages for tooling via npm. Maximum call stack size exceeded
or
Installed packages for tooling via npm. Expected a synchronous delegate but got an asynchronous one.
This is my current configuration:
Angular CLI: 6.2.4
Node: 10.9.0
OS: win32 x64
Angular: 6.0.5
... core
Package Version
-------------------------------------------------------------
@angular-devkit/architect 0.8.4
@angular-devkit/build-angular 0.8.3
@angular-devkit/build-optimizer 0.8.3
@angular-devkit/build-webpack 0.8.3
@angular-devkit/core 0.8.4
@angular-devkit/schematics 0.8.4
@angular/animations 6.0.6
@angular/cdk 6.4.7
@angular/cli 6.2.4
@angular/common 6.0.6
@angular/compiler 6.0.6
@angular/compiler-cli 6.0.6
@angular/forms 6.0.6
@angular/http 6.0.6
@angular/material 6.4.7
@angular/material-moment-adapter 6.3.0
@angular/platform-browser 6.0.6
@angular/platform-browser-dynamic 6.0.6
@angular/platform-server 6.0.6
@angular/pwa 0.10.6
@angular/router 6.0.6
@ngtools/webpack 6.2.3
@schematics/angular 0.8.4
@schematics/update 0.8.4
rxjs 6.2.1
typescript 2.7.2
webpack 4.20.2
Installing service worker separately probably solve my problem:
ng g service-worker