After analyzing, i can see that we have some images, css, js in themes/theme-name/dist/ folder with some random digits in the file name [ https://prnt.sc/cqXYgrxFgUDk ]. But our front end files calling the original css & image name[ https://prnt.sc/wD0UYOij_Gqv ]. This causing 404 and the images are also not visible in site.
What to do with this? Do i need to rename the files under dist/ ?
For example, for the facebook icon do i need to rename as facebook@2x.png from facebook@2x_8c3e0862.png ???
Kindly give me the solution.
Hi ben,
This is happening in all environments dev, stage & in production.
Earlier previous developing team installed sage in local & commit to the server.
For now, we don’t have local setup for this project. All task working in dev/stage servers directly.
Issue: We recently found lots of 404 errors due to non existing assets(images, css, js) (screenshot attached in main content).
Please let me know for further details.
If you’d like to hire someone from the Roots community to work on your project, or to do one-on-one troubleshooting or training, we have a “jobs” section for posting work requests.
Typically the yarn build command will compile assets without version numbers, and the yarn build:production command will compile them with. This is why Ben asked what your deployment method is.
Earlier previous developing team installed sage in local & commit to the server. So we are unsure about this commands was ran by them by previous team.
Can i run this command ‘yarn build’ command in our current dev server directly& deploy changes to test & production ? or need to run it in local setup (having server backup) and deploy to all three servers?
Note: We have same files & db structure in all environments. However do we need to run yarn build:production command in production server separately ???