V9: Bootstrap source map error on all front end pages

I get that error in the browser development console:

Source map error: Error: request failed with status 404 on every front end page.

Do you know what may be causing that? I can see in the page source the Bootstrap is loaded. All site functionality is working fine though.


I don’t get that on the Dashboard.

On line 7 of concrete/js/bootstrap.js you will see
//# sourceMappingURL=bootstrap.bundle.min.js.map
Just comment it out like this
/* //# sourceMappingURL=bootstrap.bundle.min.js.map */

No, that didn’t help, still get the error. Although deleting that line removed the error. But is that the right thing to do?

Since that line is throwing a 404 error then it is useless anyway (unable to be loaded)
So in this case I would say it is not “the right thing to do” but a “lesser of the two evils”.
You could track down the correct map file, load it to the server and adjust the path accordingly if you have the desire to.

If you really want to fix this the “right way” here is what I did.
Go to Download · Bootstrap v5.1 and download the bootstrap-513-dist.zip file, extract it to a temp place on your hard drive, copy the map file from the ‘js’ folder and place it in your concrete/js folder (same place as the bootstrap.js file), restore the line 7 previously deleted and that should do it.

@linuxoid - This could be a bug in the core bedrock build. If you want to open an issue, the repository is https://github.com/concrete5/bedrock

The browser only attempts to load source map files when the dev console is open, so its not an issue that affects visitors, just developers.

Could you tell me that before I made the bug report? :sweat_smile: Should I delete it?

I think it is still worth a bug report. Developers need to debug scripts.