Bug
The new v0.16.0 data platform commands (data, media, download, scrape, archive) fail on Windows with bm is not defined at runtime.
Environment
- Windows 11 Pro
- gstack v0.16.2.0 (git pull +
./setup)
- Node.js server path (Windows uses
server-node.mjs since Bun can't drive Playwright)
Steps to reproduce
# After upgrading to v0.16.2.0
./setup # completes successfully
$B goto https://getsmoov.app
$B data # => "bm is not defined"
$B media # => "bm is not defined"
All pre-v0.16 commands work fine.
Root cause
browse/scripts/build-node-server.sh uses bun build --outfile which now fails:
error: cannot write multiple output files without an output directory
The new data platform modules (media-extract.ts, network-capture.ts, etc.) introduce code-split points that Bun can't collapse into a single output file.
Using --outdir instead produces a bundle, but the browserManager reference (bm) isn't resolved correctly at runtime — the variable is either tree-shaken or scoped differently in the multi-file output.
Workaround
The structured data extraction still works via js:
$B js "JSON.stringify([...document.querySelectorAll('script[type=\"application/ld+json\"]')].map(s => JSON.parse(s.textContent)), null, 2)"
Expected
build-node-server.sh should handle the new multi-module dependencies and produce a working server-node.mjs on Windows.
Bug
The new v0.16.0 data platform commands (
data,media,download,scrape,archive) fail on Windows withbm is not definedat runtime.Environment
./setup)server-node.mjssince Bun can't drive Playwright)Steps to reproduce
All pre-v0.16 commands work fine.
Root cause
browse/scripts/build-node-server.shusesbun build --outfilewhich now fails:The new data platform modules (
media-extract.ts,network-capture.ts, etc.) introduce code-split points that Bun can't collapse into a single output file.Using
--outdirinstead produces a bundle, but thebrowserManagerreference (bm) isn't resolved correctly at runtime — the variable is either tree-shaken or scoped differently in the multi-file output.Workaround
The structured data extraction still works via
js:Expected
build-node-server.shshould handle the new multi-module dependencies and produce a workingserver-node.mjson Windows.