Closed vemv closed 6 years ago
Guessing this has something to do with the TODO in karma.clj, or the code in that ns in general.
Seems a bit fragile unfortunately!
Hi @vemv,
Thanks for the report! Can you please give us a minimal project that reproduces the error?
Will do!
Hi! The matcher warnings are harmless and they aren't related to the 404 messages.
I'm not 100% sure if your problems are caused by the 404 messages, but I know how to fix them. Karma's built-in web server serves the assets under the directory /base/
. You have to set :asset-path
for your ClojureScript build accordingly. It's value should be approximately base/
+ :output-dir
. For example, the :none-test
build in doo's example project has the same problem and it goes away by setting :asset-path
to base/out
.
Could you try this and see if it helps?
Ideally doo would take care of this automatically, either by setting :asset-path
or by configuring Karma so that it's not needed. As far as I know, Karma's directory for serving the files is not configurable.
Regarding the matchers: having three overlapping patterns in the Karma config triggers the warning messages. Probably having only /**
would be enough.
Okay, I poked around more and looks like the 404 warnings are harmless as well. When using :none
optimizations, ClojureScript generates a shim file that points to wrong URLs if :asset-path
is not properly set, but doo already takes care of this and loads those files from the right URLs.
Hey there! I was hesitating on creating a repro since some setup code is not my property.
Anyway, I could fix the issue with these cljsbuild options (just like you suggested)
:compiler {:asset-path "base/resources/test/out"
:output-dir "resources/test/out"
:output-to "resources/test/test.js"}
The magic is in the base
:
By default all assets are served at http://localhost:[PORT]/base/.
http://karma-runner.github.io/1.0/config/files.html
The 404 warnings indeed don't matter much.
Cheers - Victor
Hi!
I'm getting this in karma-chrome and karma-chrome-headless:
My app is loaded and some code loads/runs fine, but what I get is an incomplete version of my app, due to these 404s surely.
I don't know what a "matcher" is. I don't think I'm setting any specific config.
I'd say one has to include
/test/out/**/*.js
, how to achieve that?Cheers - Victor