Skip to content

I used pkg 6.14.1 to package an EXE file, and there are error logs when I launch the EXE file. #223

@hl0709

Description

@hl0709

What version of pkg are you using?

6.14.1

What version of Node.js are you using?

22.20.0

What operating system are you using?

Windows

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

default

Describe the Bug

PS C:\Users\92840> pkg -v
6.14.1
PS C:\Users\92840> node -v
v22.20.0

28 Feb 09:57:20 - [warn] [httprequest] Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'got' imported from C:\snapshot\node_modules\nodes\core\network\21-httprequest.js
Did you mean to import "got/dist/source/index.js"?

Expected Behavior

I want to use pkg to fully package and support this feature, and the packaged file must not contain any errors.

To Reproduce

I used pkg 6.14.1 to package node-red@5.0.0-beta.2. After packaging, when I launched the exe, the log showed the following error: "Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'got' imported from".

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