Issue
The update went fine, but now when I build, I get the following error.
Error: Expected to find an ngsw-config.json configuration file in the /Users/nathanielmay/Code/firebaseTest folder. Either provide one or disable Service Worker in your angular.json configuration file.
I looked in my angular.json
and found that on this line:
"ngswConfigPath": "/src/ngsw-config.json",
Property ngswConfigPath is not allowed.
I can't find an api for the new angular.json, but it seems as if I need to specify the path in a different way.
ng update @angular/pwa
didn't work either.
How can I resolve this error?
Solution
I'm not sure how "ngswConfigPath": "/src/ngsw-config.json"
, was added, but I removed it and it built fine.
Next issue I faced was that ngsw-config.json
has been moved out of src
and to the project root during the upgrade. I had to copy my updates into the root ngsw-config.json
for the service worker to register properly.
Answered By - Nate May
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.