Node: JSON configs are read as data, not imported (store-only apps failed under npx: needs an import attribute); test, pitfall 105

This commit is contained in:
CRTkafa 2026-10-22 23:18:30 +08:00
parent bd316723f5
commit d3d31d6c12
4 changed files with 24 additions and 0 deletions

View file

@ -1265,3 +1265,10 @@ that fails without the fix (see CONTRIBUTING.md).
- **Guard:** `iapLocalizationChanges` / `iapAttributeChanges` / `availabilityChange` (`cli/apple/iap.ts`), the
subscription helpers in `cli/lib/subscriptions.ts`, `planAppInfo` / `reviewDetailDiff`, `campaignDiff`,
`winBackDiff`, `eventAttrDiff`; tests `apple-iap-drift`, `subscriptions-drift`, `appinfo-drift`, `misc-drift`.
## 105. `storebound watch` on a server read no app: "needs an import attribute of type: json"
- **Symptom:** on Node (npx, a server), every store-only app failed with `Module ".../storebound.config.json" needs an
import attribute of "type: json"`; on Bun it worked.
- **Cause:** a JSON config (store-only apps get one generated) was loaded with a bare dynamic import, which Node refuses.
- **Do:** update storebound.
- **Guard:** `importConfigModule` in `cli/lib/rt.ts` reads JSON configs as data (`tests/config-json-node.test.ts`).