After
bench build --production
, assets build successfully but return 404 errors.and i tried every thing like sudo chmod o+x /home/ and migrate and build , its only works well in developer mode .
bench build --production
, assets build successfully but return 404 errors.try the following:
1- bench restart
if you are using supervisor
or stop the bech with ctrl + c
then bench start
if still not working then
2- clear caches
bench --site [your-site] clear-cache
bench --site [your-site] clear-website-cache
if still not working then
3- bench build --app frappe
if still not working then
4- use incognito mode or use another browser
if still not working then
5- delete the app then reinstall them or delete the entire site and create new one because mostly this happens out of corrupted installation
bench --site [your-site] uninstall-app [your-app]
or drop the entire site and make new one
bench drop-site [your-site]
Thanks much mohamed , i tried most of that , but if you have any idea why this only in production mode and when i enable develop mode it works like charm , or any idea to get the issued app because there is alot of work on site
i tried this hundred of times and still not working.
the develop mode automaticaly watch the changes and live rebuild,
so i think may be you need to build the site again and make sure that assets folder contain the static files
or maybe nginx doesn’t serve them!
try these commands:
bench setup nginx
then reload
sudo service nginx restart
please try to pull the latest change of your frappe branch from github then yarn install
cd apps/frappe
git pull upstream [your-frappe-branch]
yarn install
then
bench build
then restart your bench
bench restart