Skip to content

v0.16 data platform commands fail on Windows (server-node.mjs build issue) #938

@chaotix345

Description

@chaotix345

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions