Frappe custom app installation returns module not found error

I tried to copy my custom app from local machine to server and while running bench install-app i am getting module not found error. How can I solve this issue

How did you get it to your server? With bench get-app repo-url ?

I just copied the folder from apps directory and tried restoring the tar files as well as database

Try running bench get app with the path to your app folder instead of the url name

Create a folder and store the custom app which you need to install and try to create a new app using bench new-app with same name as your custom app on server.once the app is created replace your custom app folder which is inside the new folder into the new app ,now try to install the custom app on your site.