I started new Angular 8 project with those specs:
Angular CLI: 8.0.4
Node: 10.16.0
OS: darwin x64
Angular: 8.0.2
Angular PWA:
ng add @angular/pwa
package.json
"dependencies": {
"@angular/animations": "~8.0.1",
"@angular/common": "~8.0.1",
"@angular/compiler": "~8.0.1",
"@angular/core": "~8.0.1",
"@angular/forms": "~8.0.1",
"@angular/platform-browser": "~8.0.1",
"@angular/platform-browser-dynamic": "~8.0.1",
"@angular/pwa": "^0.800.4",
"@angular/router": "~8.0.1",
"@angular/service-worker": "~8.0.1",
"rxjs": "~6.4.0",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
I have 2 error in console on startup. How can I fix it?
A bad HTTP response code (404) was received when fetching the script. service-worker.js.pre-build-optimizer.js:451
Service worker registration failed with: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.