• Register
0 votes

Problem :

I am beginner to Angular. I have recently started to use the ng serve but now I continuously get below error.

“A bad http response code (404) was received when fetching the script.

I have already tried to do lot of research on it but still I don’t have any solution on it.

Can somebody help me in resolving the errors ?

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I had also faced such error very recently. I can help you in fixing above error.

Let me tell you the reason behind this error is the pending subscription to your service worker for which your current application may be don’t have the source code (so you are facing 404).

So it clearly means that it is not related to your page fault.

I know that red lines are very annoying when you are stuck with it.

A very simple solution is to just unsubscribe by hand from a browser inspect page console:

So just to have the look at how many registrations are there you can use below command :


Now to remove first registration you can use below command:


I know my above solution will fix your errors and you can start working on your angular code.

5 2 1
4,980 points

Related questions

0 votes
2 answers 1.5K views
Problem : Currently I am using VueJS and Laravel for the project. Following issue started to show lately and it also comes up even in the old git branches. Unchecked runtime.lasterror: the message port closed before a response was received. This error only comes up in Chrome browser.
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 2.4K views
Problem: I am currently wondering why I am getting below compile error if I just declare variable with var or let keywords? I want to say, below code goes well: export class MyAppComponent { myRefreshClickStream$: any; constructor(){ } } While this brings the error: export class MyAppComponent { var myRefreshClickStream$: any; constructor(){ } }
asked Jan 27 jwilliam 3.9k points
0 votes
1 answer 154 views
Problem : I am beginner to Angular 2. Currently I am trying to learn more about the server rendering with the help of Angular2, I am trying to use the gulp instead of webpack. But my problem is when my server starts then I start facing below error : /Users/mphil ... using class decorators I have also tried some solutions mentioned online but they are not working on my code. How can I fix my code ?
asked Feb 25 mphil 2.3k points
0 votes
1 answer 403 views
Problem: I am facing following error if I tried to use a MatToolBar in my angular app. In browser I receive: Uncaught TypeError: Object(...) is not a function I also receive below warnings in my console: WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js ... /cdk/esm5/a11y.es5.js 2324:206-214 "export 'ɵɵinject' was not found in '@angular/core' Kindly guide me in resolving above errors.
asked Aug 18 Raphael Pacheco 4.9k points