Skip to content

TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. #6

@ganesh-phadtare

Description

@ganesh-phadtare

Browser : chrome v65.0.3325.181

I am facing an issue as TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. This issue is occurring when I execute command as
ng build -- prod

Detail error is like
main.27194690c35d3972faa9.bundle.js:1 ERROR Error: Uncaught (in promise): TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.
TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.

and when I inspect the chrome browser - in the network tab "ngsw-worker.js" is showing the status as failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions