DashboardcraftPUBLISH_ARGS JSON fallback

PUBLISH_ARGS JSON fallback

Category: gotcha
Confidence: 1.00
ID: 01a07d10-aaa8-7661-88b5-9186177d2b1b
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 1Okgn0vvN7hdZmhlc
Created: 2026-09-07 12:30:06
Updated: 2026-09-07 18:10:39

Content

Trap: JSON.parse(process.env.PUBLISH_ARGS || '') looks like a harmless missing-value default, but an unset variable becomes an unhandled SyntaxError before deliberate validation runs. Fix: use a valid JSON fallback such as '{}' in runnable Publish entry points, because JSON.parse() must receive JSON and subsequent required-field validation can emit the intended contextual error.

Move to: