Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DomGarguilo opened this issue May 2, 2024 · 5 comments · Fixed by #426
Closed

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

DomGarguilo opened this issue May 2, 2024 · 5 comments · Fixed by #426

Comments

@DomGarguilo
Copy link
Member

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
Copy link
Member Author

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

@ctubbsii
Copy link
Member

ctubbsii commented May 2, 2024

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants