fix(app): add modules.txt/patches.txt so bench keeps ns_app in apps.txt #23
Reference in New Issue
Block a user
Delete Branch "feature/customer-statements"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_appcrashed(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> migrateto register the module.Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
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>