Skip to content

Commit bbeff6f

Browse files
fix[notask]: expose binding.js via package exports on audiogen-ggml + tts-ggml for mobile bundler (#4087)
* fix[notask][audiogen-ggml]: expose binding.js via package exports for mobile bundler The mobile bundler (qvac-test-addon-mobile at HEAD, called by integration-mobile-test-audiogen-ggml.yml) recently tightened its enforcement of the package.json "exports" field. Files not declared in "exports" are now stripped from the on-device app.bundle. Since audiogen-ggml's exports listed ".", "./models", "./test/benchmark-runner" but NOT "./binding.js", the bundler excluded binding.js from the shipped module, and require('./binding') in index.js (line ~784, _createAddon) failed on device with MODULE_NOT_FOUND: Cannot find module './binding' imported from 'file:///app.bundle/node_modules/@qvac/audiogen-ggml/index.js' Both testLoadModels and testGenerateMusicOnGpu failed within ~1 s during addon construction (before any user code ran). Pattern matches how @qvac/asr-ggml and @qvac/llm-llamacpp already declare "./binding.js": "./binding.js" for the same reason. @qvac/audiogen-ggml and @qvac/tts-ggml never added it and worked by accident under the older, lenient bundler; the tighter enforcement (landing alongside the Node 22 + Appium 3 bump on 2026-08-22) exposed the gap. Verification - Reproduced on main (Android Device Farm run 32972232229) and on an unrelated feature branch (run 32967429767) — identical error signature. - Cross-check: @qvac/asr-ggml Android mobile CI on 2026-08-25 (run 32841431292) loaded the addon successfully (6 GPU-smoke test cases ran end-to-end with real 4-60 s timings), confirming the failure is package-specific, not a global mobile-bundler outage. - Fix scope: single-line addition to the exports field. No source or behavioral change to the addon itself; binding.js content is unchanged. Unblocks any downstream mobile validation of @qvac/audiogen-ggml (functional smoke + RTF benchmark), which has been red on main since the bundler tightening landed. * fix[notask][tts-ggml]: expose binding.js via package exports for mobile bundler Same class of bug as the audiogen-ggml fix in this PR: mobile bundler enforces "exports"; binding.js was not declared and gets stripped from the on-device app.bundle, breaking require('./binding') in index.js at runtime. @qvac/tts-ggml hasn't been mobile-tested since 2026-08-18 (before the bundler tightening on 2026-08-22), so the failure hasn't been observed empirically yet — but the diagnosis and fix are identical, and the pattern matches how @qvac/asr-ggml and @qvac/llm-llamacpp already declare the same "./binding.js": "./binding.js" export. Pre-empting: without this line, the next mobile tts-ggml CI run will fail the same way audiogen-ggml did. --------- Co-authored-by: GustavoA1604 <54457676+GustavoA1604@users.noreply.github.com>
1 parent 5290ebe commit bbeff6f

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/audiogen-ggml/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"exports": {
3838
"./package": "./package.json",
3939
".": "./index.js",
40+
"./binding.js": "./binding.js",
4041
"./models": "./models.js",
4142
"./test/benchmark-runner": "./test/utils/benchmark-runner.js"
4243
},

packages/tts-ggml/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"types": "./index.d.ts",
9595
"default": "./index.js"
9696
},
97+
"./binding.js": "./binding.js",
9798
"./text-chunker": {
9899
"types": "./lib/textChunker.d.ts",
99100
"default": "./lib/textChunker.js"

0 commit comments

Comments
 (0)