Skip to content

Packaged version can't connect to GAMA #164

Description

@RoiArthurB

Describe the bug
The packaged backend (dist-api/index.cjs, i.e. all SEA binaries) cannot send any WebSocket message to GAMA:

vite stubs the optional bufferutil dep with an empty object, so ws never falls back to its JS masking implementation → TypeError: bufferUtil$1.mask is not a function on every send.

Dev mode (tsx) is unaffected, which is probably why it went unnoticed. I confirmed WS_NO_BUFFER_UTIL=1 restores GAMA communication in the bundle; the proper fix is a one-liner marking bufferutil/utf-8-validate as external in vite.backend.config.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions