Web UI not loading properly

some frappe files not exist in your site public files, error 404
try bench build

I tried it already. I am getting this:

WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the packa
ge from PyPI with: pip install frappe-bench

WARN: Command not being executed in bench directory

it says " Command not being executed in bench directory"
first enter frappe directory then execute bench build
try cd frappe-bench
then bench build

Facing the same issue on AWS EC2. Tried bench build and other stuff. Couldn’t find a solution. My old instances on EC2 works fine. Just new ones are going stripped of CSS.

I ran bench build successfully but the issue is still there.

Its mostly not about building the asset files, but its about nginx configuration.
check the configuration if you did manual install not using the easy install script

I installed it using an easy install script:
My steps:
sudo apt update
sudo apt -y upgrade
apt install python3-minimal build-essential python3-setuptools
sudo add user erpnext
sudo usermod -aG sudo erpnext
su erpnext
sudo wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
sudo python3 install.py --production --verbose

I deployed it by creating a 2GB instance and now it is working fine.
I just want to know why it is creating a problem while deploying it in a 1 GB instance. Also, i have created a swap file, still it is of no use.

1 Like

remember that 404 error mean the file not found so it can be either bad nginx config or the file really not exist.

for example in the browser console it says 404 frappe-web.min.js not found so if you go to sites/assets/js and if this file is not in this folder that mean it is not nginx config problem but bench build faild probably due to low memory with 1GB, you can try to increase memory limit with:
export NODE_OPTIONS=“–max-old-space-size=8192”
then run bench build, the file should be there and problem solved.

Actually, This installation incorrect / unusual, because you actually created a user erpnext and used it as a superuser to install frappe which in this case might install the software using incorrect permissions.

The best way to install it is actually by following the documentation step by step and make it easy with no or minimal modifications.

The usual user for bench is frappe and is created automatically by the installation file, you dont need to do more than that.

Are you using a custom Website Theme? When I’ve had this issue in the past, I’ve been able to solve it by rebuilding my custom theme doc, which can be done simply by editing and saving it.

Hi @peterg,

I have faced same issue.

Please help me
Thanks

The solution that worked with me is installing on a large memory instance 2GB for example

1 Like

Hi @A.Mas,

Thank you so much for help.

I have performed export NODE_OPTIONS="–max-old-space-size=8192 but issue still replicated.

500 Internal Server Error is shown in web page console.

Thanks

one of the problem, is your account directory has no permission for other daemon access.

in my case, I just add the command
chmod o+x /home/frappe

frappe is my erpnext install account, you should change it base on your environment

4 Likes

I upgraded my EC2 instance to a larger instance type (with 2 gigs of RAM) and installed again and everything works fine.

The minimum required RAM is 2GB for ERPNext.

Thanks Lawes. Its worked me

It’s Work for me.
it Means User not right’s to access some file…like css

Finally i fix the display problem after run production site.

So it just need to change the permission for the installation directory. On my case, I run this command in :~/frappe-bench$ directory. So go to cd ~/home/[youraccount]/frappe-bench then run:

sudo chmod o+x /home/[your-account-profile]/
eg: sudo chmod o+x /home/admin

The problem is, some answer on the other thread did not explain this properly, so newcomer like me can’t understand :smiley:

2 Likes