I have created a new angular project. Then I add
ng add @angular/pwa
I got an error like this even I can't find the ngsw-config.json file
Path "/ngsw-config.json" already exist.
In angular CLI version is 6.1.1.
Invalid rule result: Function().
In angular CLI version is 6.0.3
I had the same issue. I came from Angular 5 and updated to Angular 6.
I use these specific versions to get it work:
npm install --save @angular/[email protected]
npm install --save @angular/[email protected]
And I had also to remove this entry from angular.json:
"ngswConfigPath": "src/ngsw-config.json"
Try to install the CLI version 6.0.8 and then install in a clean project try ng add @angular/[email protected]
Seems like the error hasn't been solved by the core team so in the meanwhile we have to use a lower version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With