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

[PRO] ChunkLoadError: Cannot load js assets, drawer does not work #337

Open
olavurmortensen opened this issue Feb 2, 2024 · 0 comments
Open

Comments

@olavurmortensen
Copy link

Symptoms

TL;DR: browser is able to download js asset, but hydejack-9.1.6.js gets ChunkLoadError.

The result is that opening and closing the "drawer" doesn't work. If I open the

My site can be found here:
https://www.olavur.consulting/

Debugging

When loading the site, there is an error in the hydejack-9.1.6.js script. The script tries to load various other js assets, but fails to load two of them:

  • vendors~drawer-hydejack-9.1.6.js
  • vendors~push-state-hydejack-9.1.6.js

The js assets that the function is trying to load are available, so loading them shouldn't be a problem:
https://www.olavur.consulting/assets/js/vendors~drawer-hydejack-9.1.6.js

The browser is able to download this file as well, on other words the HTTP GET request is successful.

I've tried this on various browsers, so it is not a simple compatibility issue.

Building site

Working with jekyll v4.3.3 and ruby 3.3.0.

gem install webrick jekyll bundle
bundle install
JEKYLL_ENV=production bundle exec jekyll build

Full error message

Uncaught (in promise) ChunkLoadError: Loading chunk 13 failed.
(missing: https://www.olavur.consulting/assets/js/vendors~drawer-hydejack-9.1.6.js)
    e https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
    <anonymous> https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:28
    o https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
    <anonymous> https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
    <anonymous> https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
[hydejack-9.1.6.js:13:1115](https://www.olavur.consulting/assets/js/hydejack-9.1.6.js)
Uncaught (in promise) ChunkLoadError: Loading chunk 16 failed.
(missing: https://www.olavur.consulting/assets/js/vendors~push-state-hydejack-9.1.6.js)
    e https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
    <anonymous> https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:28
    o https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
    <anonymous> https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13
    <anonymous> https://www.olavur.consulting/assets/js/hydejack-9.1.6.js:13

Question

So my question is, what does the ChunkLoadError actually mean in this case? The asset seems to be available, but why can't this js function load it?

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

No branches or pull requests

1 participant