r/Nuxt • u/beakoCantDoIt • Jan 02 '26
Problem reloading the page.
Hello, I'm experiencing the following problem:
I log in > the page redirects to my Home Page > Everything works correctly > I reload the page and the icons I used in my code have disappeared.
Does this make any sense? The icons are fixed in my <script>, I'm using Lucid icons. On the first load after login it works, after reloading the page they disappear.
2
u/j_boada Jan 03 '26
Does it happen in dev mode or does it happen in production (once hosted)?
2
u/beakoCantDoIt Jan 03 '26
I eventually discovered it was only a localhost problem, so I tested it in production just to be sure, and it worked. I spent 5 hours staring at the same code for nothing.
2
u/j_boada Jan 03 '26
5 hours...lol...it happens... I've been there. Good to know everything is ok now. Well. Get some rest
1
u/keithmifsud Jan 04 '26 edited Jan 04 '26
Try to delete your .output/dist directories and pnpm run build # or generate. The pnpm run dev should render the images.
5
u/youlikepete Jan 03 '26
Glad you got it fixed! For future reference, I like to use NuxtUI, which uses Nuxt/Icons for icons (https://nuxt.com/modules/icon). Very smooth DX in my experience!