Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mcadio's avatar

Laravel page not displaying styles

My main page isn't showing styles, as I'm getting a not found error after building and pushing to production. On my test side, it works ok. http://justmillit.com [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (app-09090227.js, line 0)

I'm using this package, and I got the photos to upload correctly (yay!) but this has got to be something simple, right? https://github.com/thecodeholic/laravel-10-blog

0 likes
5 replies
LaryAI's avatar
Level 58

Based on the information provided, it seems like the issue is related to the file app-09090227.js not being found on the production server. Here are a few steps you can take to troubleshoot and resolve the issue:

  1. Check the file path: Make sure that the file app-09090227.js exists in the correct location on the production server. Double-check the file path and ensure that it matches the path specified in your HTML or CSS files.

  2. Verify file permissions: Ensure that the file has the correct permissions set so that it can be accessed by the web server. You can use the chmod command to adjust the file permissions if needed.

  3. Check the file name and extension: Confirm that the file name and extension are correct. It's possible that there may be a typo or a mismatch between the actual file name and the one referenced in your HTML or CSS files.

  4. Clear cache: If you have made any recent changes to your CSS or JavaScript files, it's possible that the browser cache is causing the issue. Try clearing your browser cache and reloading the page to see if that resolves the problem.

If none of the above steps solve the issue, it would be helpful to provide more information about your project setup, such as the directory structure, the code that references the app-09090227.js file, and any relevant configuration files.

da_Mask's avatar

Are you running something like npm run dev locally? You might need to run npm run build on your production server, or if you don't have that sort of access, run it locally and add those file to your repository.

2 likes
spetz83's avatar

Did you get this sorted? I looked at the "Main" branch of your repo and I see public/build/assets/app-9f34e40c.js That is obviously a different js build than what the server is trying to look for. If I were you, I would try these things in order:

  1. Look on your production server in the public/build/assets directory and see what js file is supposed to be loaded and compare that to the 404 you are getting.
  2. Use artisan to clear the view cache php artisan view:clear and refresh to see if it picks up the correct js file. Maybe your layout got cached hard or something.
  3. Check that all the file/folder permissions are set correctly on the prod server.
  4. run npm run build from prod as @da_mask mentioned. That should rebuild your css and js files and update the manifest.
mcadio's avatar

@spetz83 YES! I realized that the branch I had pushed to was not the branch I was pulling from, so the asset files were not actually there. I re-built on my local machine because my prod server wouldn't let me, and then I pushed and pulled from the same branch. It's working! THANK YOU!

Please or to participate in this conversation.