From 192af42614b28973519a0f49459b3c5b6798a3f7 Mon Sep 17 00:00:00 2001 From: Norman King Date: Thu, 9 Jul 2026 10:02:53 -0400 Subject: [PATCH] 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 migrate` to register the module. Co-Authored-By: Claude Opus 4.8 --- ns_app/modules.txt | 1 + ns_app/ns_app/__init__.py | 0 ns_app/patches.txt | 0 3 files changed, 1 insertion(+) create mode 100644 ns_app/modules.txt create mode 100644 ns_app/ns_app/__init__.py create mode 100644 ns_app/patches.txt diff --git a/ns_app/modules.txt b/ns_app/modules.txt new file mode 100644 index 0000000..a778d15 --- /dev/null +++ b/ns_app/modules.txt @@ -0,0 +1 @@ +NS App diff --git a/ns_app/ns_app/__init__.py b/ns_app/ns_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ns_app/patches.txt b/ns_app/patches.txt new file mode 100644 index 0000000..e69de29 -- 2.39.5