From 081ba071761fb91476d559f339385a0f78b98b00 Mon Sep 17 00:00:00 2001 From: Jordan Ritter Date: Thu, 18 Jun 2026 13:25:37 -0700 Subject: [PATCH] fix(standalone): use __filename fallback for createRequire in CJS bundle standalone/savings-check.js is an esbuild CommonJS bundle (standalone/package.json declares "type": "commonjs"), so import.meta is never available at runtime and import_meta.url is always undefined. createRequire(undefined) throws ERR_INVALID_ARG_VALUE on every Node version, so running the script as documented (node savings-check.js) fails immediately on a clean checkout. Fall back to __filename when import.meta.url is absent. --- standalone/savings-check.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standalone/savings-check.js b/standalone/savings-check.js index 7c24edd..857b2d3 100644 --- a/standalone/savings-check.js +++ b/standalone/savings-check.js @@ -15061,7 +15061,7 @@ function Qk($, Q) { var M4 = ($, Q) => { for (var J in Q) OG($, J, { get: Q[J], enumerable: true, configurable: true, set: Qk.bind(Q, J) }); }; -var v6 = (0, import_node_module.createRequire)(import_meta.url); +var v6 = (0, import_node_module.createRequire)(import_meta.url || __filename); var Xk = Symbol.dispose || /* @__PURE__ */ Symbol.for("Symbol.dispose"); var Yk = Symbol.asyncDispose || /* @__PURE__ */ Symbol.for("Symbol.asyncDispose"); var Z$ = ($, Q, J) => {