Search code examples
angularionic-frameworkconsole.logdevtoolssource-maps

SourceMaps failed to load SourceMap IonicAngular


When I want to console.writeline() in an .ts file in Angular, nothing has shown up in the console. An alert works fine. When I looked at the warnings, the following sentence is given:

DevTools failed to load SourceMap: Could not load content for http://localhost/runtime.js.map: Connection error: net::ERR_CONNECTION_REFUSED

A total amount of 25 warnings with the same warning. The difference between them is the js file like polyfills.js and vendor.js.

I tried to change the settings by settings => sources like everyone is saying but nothing changed. I also restart the application and browser but nothing changed.

The console.log() has worked for several months, but it doesn't work anymore for some reason. I don't have any idea how to find where the problem arises. Maybe Ionic, Angular or maybe something that needs to be reinstalled.

Please all suggestions are good. Thank you in advance and your cooperation.


Solution

  • I have found the solution. I needed to run npm install again and now it works fine.