DEV Community

Discussion on: Create a SPA with Laravel and Nuxt

Collapse
 
jintoples profile image
jintoples

I have problem with static resouces images, not found 404 after npm run build.

Collapse
 
skyrpex profile image
Cristian Pallarés

Hi there! Are the images in the public/_nuxt directory after building? If not, do you use the resources/nuxt/static directory to publish images?

You could also try to import the images in your components (you'll receive the URL string) and use it in the views.

Collapse
 
robertbar profile image
RobertBar • Edited

Hi Cristian. What about the files that are stored in the Laravel storage folder? I am not able to access them. Should I try another approach or I am on the right path?

UPDATE: I have created a symlink for storage/ inside static folder. Everyhting is working as expected.

Collapse
 
rdigitalg profile image
rdigitalg

Hello, Cristian. On npm run build i can't access the files from static directory. There is something extra I need to do in order to access them? Thank you!

Collapse
 
rdigitalg profile image
rdigitalg

Hi, @jintoples . How did you managed to fix this error? My files can be accessed when I run npm run start but when I run npm run build the files are not available anymore.