Skip to content

process.config is not cloneable anymore in v16.x #43581

@bnoordhuis

Description

@bnoordhuis

v16.0.0 / process

#36902 made process.config immutable. That's fine in principle but the use of a Proxy breaks the following code:

v8.serialize(process.config) // Uncaught Error: #<Object> could not be cloned.

The properties themselves are proxies too so Object.fromEntries(Object.entries(process.config)) is not an easy workaround.

I suggest using Object.freeze() or Object.seal() instead.

cc @jasnell

Metadata

Metadata

Assignees

No one assigned

    Labels

    processIssues and PRs related to the process subsystem.

    Type

    No type
    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