From 3daff71439f7baf58935498f8970c7cb94129a02 Mon Sep 17 00:00:00 2001 From: saurabh singh Date: Thu, 23 Apr 2026 22:53:34 +1000 Subject: [PATCH] fix(browser-metro): declare acorn-jsx as a direct dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit transform-error.ts imports `acorn-jsx` (added in 1.0.15 alongside the acorn-based syntax error reporter) but the package was never listed in browser-metro/package.json's dependencies. In a workspaced monorepo it silently resolves via dev-time workspace hoisting; published consumers hit MODULE_NOT_FOUND at first import of Bundler / IncrementalBundler. Repro against the npm artifact: npm init -y npm i browser-metro@1.0.17 node -e 'require("browser-metro")' # → Error: Cannot find module 'acorn-jsx' Fix is a one-line dependency add; ^5.3.2 matches what the acorn@8 ecosystem converges on. --- browser-metro/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/browser-metro/package.json b/browser-metro/package.json index c42191c..d30a331 100644 --- a/browser-metro/package.json +++ b/browser-metro/package.json @@ -32,6 +32,7 @@ "license": "MIT", "dependencies": { "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", "sucrase": "^3.35.1" }, "devDependencies": {