FileNotFoundException
Closed this issue · 5 comments
Sorry to pester you for a second time in a week. I suspect there's something wrong in my configuration:
java.io.FileNotFoundException: /teachbanzai/fonts/FiraSans-Extralight.eot
at optimus.assets.creation$existing_resource.invokeStatic (creation.clj:25)
optimus.assets.creation$existing_resource.invoke (creation.clj:24)
optimus.assets.creation$create_binary_asset.invokeStatic (creation.clj:54)
optimus.assets.creation$create_binary_asset.invoke (creation.clj:52)
optimus.assets.creation$eval1967$fn__1968.invoke (creation.clj:68)
clojure.lang.MultiFn.invoke (MultiFn.java:233)
optimus.assets.creation$load_asset_and_refs.invokeStatic (creation.clj:71)
optimus.assets.creation$load_asset_and_refs.invoke (creation.clj:70)
optimus.assets.creation$load_asset_and_refs$fn__1972.invoke (creation.clj:72)
The error is thrown in the build process, and it happens when I incorporate a CSS file as a bundle:
(load-bundles "public" {"style.css" ["/teachbanzai/css/style.css"]})
The font file is indeed there, and when style.css is used without optimus, the font file is found normally. Any thoughts?
That is weird. Could you try using relative URLs and see if that fixes things? (ie. ../fonts/FiraSans-Extralight.eot
instead of /teachbanzai/fonts/FiraSans-Extralight.eot
.
Strange... returns the exact same error. I should have mentioned, this isn't actually the app's deployment when it happens, it's an error coming from our continuous delivery server as it runs our test suite. Is that part of the mystery, perhaps?
Quite possibly, but I can't conjure a possible explanation at this point. Does it work in dev? In prod? How are you referencing the font-file in the CSS?
@font-face {
font-family: 'Fira Sans';
font-weight: 200;
src: url("../fonts/FiraSans-Extralight.eot");
/* IE9 Compat Modes */
src: url("../fonts/FiraSans-Extralight.eot?#iefix") format("embedded-opentype"), url("../fonts/FiraSans-Extralight.woff2") format("woff2"), url("../fonts/FiraSans-Extralight.woff") format("woff");
}
The CSS is located at ./public/teachbanzai/css/style.css
and the fonts are in ./public/teachbanzai/fonts
.
I'll see if there isn't a way to replicate it outside my CI environment...
Yeah, that looks just like mine. One example:
@font-face{
font-family:'FontAwesome';
src:url('../font/fontawesome-webfont.eot');
src:url('../font/fontawesome-webfont.eot') format('embedded-opentype'),url('../font/fontawesome-webfont.woff') format('woff'),url('../font/fontawesome-webfont.ttf') format('truetype'),url('../font/fontawesome-webfont.svg') format('svg');
font-weight:normal;
font-style:normal
}