This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-01
Channels
- # announcements (7)
- # babashka (10)
- # beginners (60)
- # clerk (4)
- # clojure (19)
- # clojure-conj (5)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (2)
- # clojurescript (12)
- # conjure (2)
- # core-async (24)
- # cursive (3)
- # datalevin (18)
- # events (1)
- # figwheel-main (5)
- # fulcro (22)
- # honeysql (29)
- # hyperfiddle (60)
- # jobs (3)
- # leiningen (18)
- # lsp (47)
- # meander (21)
- # missionary (6)
- # off-topic (35)
- # reagent (14)
- # remote-jobs (1)
- # ring (1)
- # shadow-cljs (32)
- # sql (10)
- # transit (12)
Hi there folks. Bit of a head-scratcher: when using :advanced
optimization settings I am getting a ChunkLoadError: Loading chunk 831 failed.
This is preceded by a an error saying that we failed to GET cljs-out/web/831.main_bundle.js
. Thesr errors have been introduced by using a https://openlayers.org/en/latest/apidoc/module-ol_source_GeoTIFF.html in the js maps library OpenLayers and, judging from the stack-trace, it is happening while trying to load the tiles of this image. All works fine with optimization set to none. Any thoughts much appreciated. I'll add more info about the error below
The GET 404: (here it's coming from cloudfront but the same when running the app locally with optimization). Bit unclear with the minimised var names
main_bundle.js:2 GET net::ERR_ABORTED 404
l.l @ main_bundle.js:2
l.f.j @ main_bundle.js:2
(anonymous) @ main_bundle.js:2
l.e @ main_bundle.js:2
e._awaitingDecoder @ main_bundle.js:2
(anonymous) @ main_bundle.js:2
St @ main_bundle.js:2
loadTile_ @ main_bundle.js:2
(anonymous) @ main_bundle.js:2
(anonymous) @ main_bundle.js:2
u @ main_bundle.js:2
loader @ main_bundle.js:2
load @ main_bundle.js:2
...
The ChunkLoad error:
Uncaught (in promise) ChunkLoadError: Loading chunk 831 failed.
(error: )
at l.f.j (main_bundle.js:2:2877032)
at main_bundle.js:2:2875302
at Array.reduce (<anonymous>)
at l.e (main_bundle.js:2:2875280)
at e._awaitingDecoder (main_bundle.js:2:2813376)
at new Promise (<anonymous>)
at new <anonymous> (main_bundle.js:2:2813357)
at St (main_bundle.js:2:2813206)
at jt.loadTile_ (main_bundle.js:2:2819549)
at main_bundle.js:2:2775575
"fixed" by adding a webpack.config.js
with:
const webpack = require('webpack');
module.exports = {
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
]
};
but I don't love it since it's removing the benefits of chunks.being caused by geotiff.js
which is a dependency of openlayers (on the off chance anyone searches for this)