Understanding Frappe initialization scripts

Hi! I’m new to Frappe/ERPNext; I came on over here after evaluating OpenERP and finding it to be excessively messy and difficult to customize. Love what I am seeing so far from this team! As a python/web dev, my goal is to set up a production server for my company’s internal use, as well as develop customized apps for a few features we need that aren’t included in the main ERPNext core features. I’m also interested in potentially contributing those apps to the “Frappe market” if they might be useful to others.

So, I installed ERPNext using the Frappe Bench install script as outlined in the Bench readme. I was going for a development server, so I excluded the “--setup-production” option. This all ran fine. Yay!

Then I ended up removing the installed frappe-bench/apps/erpnext folder, and instead cloned my own fork of the GitHub repo into the same location. (In hindsight this was not the best course of action… I should have just added my GitHub repo as a remote. But anyway, that’s what I did.)

So this seemed to create some issues. I can happily start the server and login as Admin; however, the dashboard is not working (seems to be missing references, i.e. the server can’t find the correct files to serve). I tried running bench install-app erpnext in hopes of fixing this, but it did not help the issue.

I think I am now missing some kind of “egg” folder that is meant to be in the ERPNext apps folder… or is it something else? Can someone please advise on what is the ‘missing link’ that I need in order to run things properly? I have spent some time going through the installation scripts but I can’t seem to isolate the issue. Thanks in advance!

@brittany welcome to the forum :smile: and thanks for your kind words.

You need to do bench get-app as it installs erpnext in the bench environment (frappe-bench/env/bin/python) and adds it to apps.txt a local listing of installed apps.

Check this:

@pdvyas Am I correct?

I think all you’ll have to to do is

./env/bin/pip install -e apps/erpnext

from the frape-bench dir as frappe.

Also, set upstream to https://github.com/frappe/erpnext.git

@pdvyas that worked perfectly. Thanks!

@rmehta Thanks for the welcome and for pointing to the relevant code :slight_smile:

I think the issue was that the egg was missing (the egg doesn’t get pulled with the git repo), and installing via pip put the egg in place. Thanks again!

1 Like