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".