Weird 404 errors in `undefined:12`
Recently, I have been getting a lot of errors like:
in the console. Both in localhost as well as on the built&deployed site.
it says this
404
happens in undefined:12
.
I'm a little stumped, because my site works fine, nothing seems to be missing.
I don't know what index-b543198f.js
is the line 12 of undefined
is also unhelpful.11 Replies
Could you please give a bit more context about your project? Classic template vs. Solid Start? What vite settings? Stale cache maybe?
@lexlohr of course,
vite-template-solid
and
here's my vite config:
Ah, you're using vite's template. I guess the issue is with your deployment. DId you invalidate previous deployments?
for sure, after every new deploy, I run a cloudfront invalidation with
/*
(as part of the github action)
but the issue mostly happens during development
I have just "also" seen in happen in the deployed site from time to timein development it really happens every time I reload the page
I mean it's mostly annoying, since it distracts from the issues I actually want to look at in the console
ah, now it says
images/undefined
, thats new
that gives a hint that it's an image thats not available during loading
if I look into the Sources
tab of chrome, I can't find any assets/index-....css
file (since it's a 404)after reloading it's just
undefined:12
againhow would I clean the vite/solidjs cache? is it maybe liking some now outdated files?
rm -r node_modules/.vite
thank you, but unfortunately still the same console output afterwards
I mean, the site seems to be working fine, it's just the unnecessary red-error spam in the console thats got me curious
ok, so I did a
rm -rf node_modules
+ yarn install
+ complete hard reload and clear caches in chrome
now it'sgone👍
Doing caching right is one of the hardest things.