Error: No such command "migrate"


I was working on ERPNext and suddenly when I tried to do
bench migrate it returns
Error: No such command "migrate"
This used to work before and now I have no idea why.

A traceback would offer clues here - have you none?

I don’t have where to look. @clarkej

Please can you attach a screenshot how you a run ‘bench migrate’

Hi @aldoblack,

Make sure you’re executing commands from within the “frappe-bench” folder. See my screenshot below. I get the same message “No such command ‘migrate’” when I’m not in the correct folder.


@brian_pond @clarkej
I know that. I’ve been using frappe for some time but still error.
Here is a screenshot

Your bench environment is confused and no longer can run ‘console_scripts’ commands

frappe@erpnext:~/frappe-bench$ whereis bench
bench: /usr/local/bin/bench
frappe@erpnext:~/frappe-bench$ ls -al /usr/local/bin/bench
-rwxr-xr-x 1 root root 350 Jan 22 2017 /usr/local/bin/bench
frappe@erpnext:~/frappe-bench$ less /usr/local/bin/bench

Maybe search up how to reinstall your bench?

@clarkej this is the erpnext that employees are using. If i do something wrong it will break.

So your question is how to restore the bench without shutting down your running erpnext instance?

Possibly that can be done - but you would need an erpnext + python + unix process expert for that.

Yes I found to run ‘bench update’ solves the missing frappe commands problem. But to run that in a production instance might cause an outage!


 ./env/bin/pip install -q -e ./apps/frappe 
from the frappe-bench directory solved the issue

1 Like

Faced this problem after installing black formatter.

click was upgraded to 8.0.1 causing this problem in latest bench.

Forced install click version 7.0 using below command:
./env/bin/pip install -U "click==7.0" --force-reinstall