Why does Laravel9/Vite application not find the assets files after build

Viewed 279

Having built the assets,

build
vite build

vite v3.0.3 building for production...
āœ“ 64 modules transformed.
public/build/manifest.json             0.28 KiB
public/build/assets/app.45719a2b.css   189.82 KiB / gzip: 26.83 KiB
public/build/assets/app.bbc97e91.js    117.98 KiB / gzip: 37.68 KiB

in a newly created Laravel 9 project I am getting the console error messages

GET http://localhost:8001/public/build/assets/app.45719a2b.css net::ERR_ABORTED 404 (Not Found)
GET http://localhost:8001/public/build/assets/app.bbc97e91.js net::ERR_ABORTED 404 (Not Found)

Both are reported as being in the layout blade at a line containing

@vite('resources/js/app.js')

I have followed all the instructions, for getting this far that I could find, but to no avail, the same error occurs. I have reworked this project three times using the directions and it all comes to this error.

0 Answers
Related