Get rid of missing source map errors (Failed to parse SourceMap)


You might be receiving this notice in your browser console or some logs,

‘Failed to parse SourceMap: http…… ‘

Look inside the file for a line that looks like this.


Now add a space, clear your caches and try loading the page again. The error should dissapear.

//# source

This can be difficult to solve, an easy work around that is tested is provide below.

What this does is that the source map is no longer being downloaded so it will not be flagged as missing. Remove the space if you want to restore functionality.


“A workaround for locally distributed vendor js files would be to edit them and modify the reference to the source map. For instance on backbone.min.js I’ve altered the line



//# source

…so that I can easily switch it back on again by removing the space. Obviously if you’re using a CDN version this isn’t going to work, but for development I’d recommend using local copies of vendor libs.”