Error: No such command "migrate"

Hello,

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.

3 Likes

@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!

Running

 ./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

2 Likes