Skip to content

Standalone Binaries cannot be created for Node 20+ #393

@geographika

Description

@geographika

The pkg module used to create standalone binaries has been deprecated. It appears it can only build binaries using version 18 of node or lower.
The GeoStyler parsers use some newer node functionality such as structuredClone, causing errors such as:

ReferenceError: structuredClone is not defined

This was introduced in Node17 so is included in Node18, so the releases seem fine for now.
In order to continue building binaries in newer versions of node beyond v18 a new approach is required.
Node itself has a new experimental feature that could be used: https://nodejs.org/api/single-executable-applications.htm

A few other links:

https://github.com/nodejs/single-executable/discussions
ChainSafe/lodestar#3633 (comment)
https://github.com/nodejs/single-executable/blob/main/docs/existing-solutions.md
https://github.com/mongodb-js/boxednode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions