Module not showing when creating new doctype

Background:
I created a custom app using bench new-app.
I removed the auto-generated module directory, icon from desktop.py and name from modules.txt.
I created new module and added its details in modules.txt and desktop.py

Issue:

  1. My site shows both modules in “show/hide desktop icons”.
  2. The module I created does not come for selecting while creating a new doctype, but old module which I deleted is visible.

What I tried:
bench clear-cache
bench reboot
bench update

Fixed by

  • adding old name to modules.txt
  • running bench uninstall-app for site
  • remove old name from modules.txt
  • reinstalling app

Hi,

This is not solving.

I followed exactly what you shared. I ran the command:

cd /workspace/development/frappe-bench

Uninstall the app (this will remove the module cache)

bench --site development.localhost uninstall-app aarohan

Reinstall the app (this will rebuild modules from modules.txt)

bench --site development.localhost install-app aarohan

Migrate

bench --site development.localhost migrate

Clear cache

bench --site development.localhost clear-cache
bench restart

But despite this, the doctype that I created is not visible.