fix(app): add modules.txt/patches.txt so bench keeps ns_app in apps.txt #23

Merged
norman merged 1 commits from feature/customer-statements into production 2026-07-21 18:45:17 +00:00

1 Commits

Author SHA1 Message Date
192af42614 fix(app): add modules.txt/patches.txt so bench keeps ns_app in apps.txt
ns_app was hand-created without the standard scaffolding files, so it was
missing modules.txt and patches.txt. bench's is_frappe_app() check requires
all of hooks.py, modules.txt, and patches.txt to exist; BenchApps.sync()
rebuilds sites/apps.txt from the folders that pass that check. sync() runs on
bench get-app, install-app (of any app), update, etc., so every such command
silently dropped ns_app from apps.txt.

Once ns_app was missing from apps.txt, `bench build --app ns_app` crashed
(esbuild get_public_path returned undefined), the sites/assets/ns_app symlink
was never created, and /assets/ns_app/js/customer_statements.js 404'd. That
left ns_statements undefined, so the Customer "Generate Statements" button's
handler did nothing and the statement screen never opened on production.

Add modules.txt ("NS App", matching app_title), an empty patches.txt, and the
"NS App" module package folder so bench recognizes ns_app as a Frappe app and
stops removing it. Run `bench --site <site> migrate` to register the module.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 10:02:53 -04:00