Skip to content

[Maybe An Enhancement] pkg warning: 'assert' will crash #227

@Wing-summer

Description

@Wing-summer

Hello! I try to use esbuild and pkg to make it a standalone executable file. I receive the warning:

Calling 'assert' will crash at run-time because it's an import namespace object, not a function

Yeah, it actually crashed if it executes the assert. So I try to modify all import assert = require("node:assert"); to import { strict as assert } from 'assert'; and it works.

I'm not a nodejs or vscode-plugin dev. I think if Named Import also works with vscode-extension, it will be better with compatibility not only vscode-extension but also other nodejs env relative packer.

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