Hi,
Am trying to build ui in custom app but www folder missing in the app. can anyone guide how to build it?
Regards
Hi,
Am trying to build ui in custom app but www folder missing in the app. can anyone guide how to build it?
Regards
Hi,
If this folder is missing, it could be due to various reasons such as incorrect installation or configuration.
Here are a few steps you can try to resolve the issue:
Check if the “www” folder is present in the ERPNext installation directory. The default path is “/home/frappe/frappe-bench/apps/erpnext/erpnext/public”. If the folder is not present, you can try to reinstall ERPNext.
If the “www” folder is present, but empty, you can try to regenerate the assets by running the following command in the ERPNext installation directory:
bench --site [site_name] build
This will regenerate the static assets for the site.
Check if the “www” folder has the correct permissions. The folder should be owned by the user “frappe” and the group should be “frappe-worker”. You can use the following command to set the correct permissions:
sudo chown -R frappe:frappe-worker /home/frappe/frappe-bench/apps/erpnext/erpnext/public/www
If none of the above steps work, you can try to reinstall ERPNext from scratch, making sure to follow the installation guide carefully.
Hope this will help you out.
Thank you.
Hi @VINOTH thank you for the response but www folder is missing in my custom app not in erpnext. Is there anyway to regenerate the folder without reinstall?
Hi, @arokia
steps you can follow:
Make sure you are in the directory where your custom app is located. You can use the following command to navigate to the directory:
cd /home/frappe/frappe-bench/apps/[custom_app_name]
Run the following command to regenerate the “www” folder, This command will rebuild the assets for your custom app, including the “www” folder:
bench build
Verify that the “www” folder has been regenerated by checking if it is now present in the “public” folder of your custom app:
/home/frappe/frappe-bench/apps/[custom_app_name]/public/www
Hope this will help you out.
Thank you.
Tried running “bench build --app custom_App” name but www folder didn’t generated.
Hi,
You can try this steps:
Navigate to the “public” folder of your custom app:
cd /home/frappe/frappe-bench/apps/[custom_app_name]/public
Delete the “www” folder:
rm -rf www
Regenerate the “www” folder by running the following command:
bench build
Hope this will help you out.
Thank you.
Tried above steps but folder not created.
The www folder comes up empty anyway (I just checked by creating a custom app). If it’s missing just create the folder and add whatever files you need there
ie. in custom_app/custom_app/www
I tried adding it manually but exact issue is am trying to setup frappe ui with existing custom app, page is routed but while rendering the page files shows 404 error. asset files are not build properly. Its is working fine in local but gives 404 error in production setup
Can you show the error?
Can you send a minimal reproducible example of the code you tried? (In the WWW folder)
Also, I just noticed you’re trying to access the files directly from assets. That’s not how it works. The assets are compiled under the respective folders for each app. Frappe files will be under /assets/frappe for example