apache / accumulo-website

Apache Accumulo Website
https://accumulo.apache.org
14 stars 99 forks source link

Error when running development docker container - map files not found #425

Closed DomGarguilo closed 4 days ago

DomGarguilo commented 2 months ago

When I run the development docker container, I am seeing new errors in the server logs when I visit the webpage:

ERROR `/js/bootstrap/5.3.1/dist/js/bootstrap.bundle.min.js.map' not found.
ERROR `/css/bootstrap/5.3.1/dist/css/bootstrap.min.css.map' not found.

I think this is happening after the changes in #423 where the resources are now served from our site as opposed from a cdn. I don't see a reason why we shouldn't just include these map files along side the other resources but there might be a reason I am not thinking of.

DomGarguilo commented 2 months ago

@ctubbsii, when not running inside the docker container, do you see these errors too?

ctubbsii commented 2 months ago

I did not see any such errors. However, those are optional resources. They are used to debug minified code. The browser should only ask for them if you're using the browser's built-in source code inspector, which I didn't use when I was testing the site. We don't really need to add them... I can't imagine we're going to be debugging bootstrap libraries themselves while maintaining our site. If we really feel it's necessary, then it'd probably be better to just switch to using non-minified versions of the libraries we're using, because those are probably even easier to debug I think.

DomGarguilo commented 2 months ago

The browser should only ask for them if you're using the browser's built-in source code inspector, which I didn't use when I was testing the site.

I did not use this either. These errors appeared in the shell I had attached to the docker container, from jekyll serve.

I see your point about these files not being useful in this scenario. I think it is odd that jekyll serve complains about this as an ERROR. If we do not include these files, the error will continue to be displayed (not a big deal).

DomGarguilo commented 2 months ago

I thought through this a bit more and since there are references to the map files from within the min files, it seems like the intended use case is to distribute the map files along with the min files. An alternative to manually remove the references to the map files from the min files does not seem like a good idea. So to me it seems like we either distribute both the min and map files or just the min and ignore the errors.

ctubbsii commented 1 month ago

So to me it seems like we either distribute both the min and map files or just the min and ignore the errors.

The third option, which is my preferred one, is that we just don't use the minified versions. The non-minified ones shouldn't need the map files at all, and the difference is not going to be significant for our site.