@yao-pkg/pkg 6.3.1 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -408,6 +408,15 @@ PKG_NODE_PATH=/path/to/node pkg app.js
|
|
|
408
408
|
|
|
409
409
|
## Troubleshooting
|
|
410
410
|
|
|
411
|
+
### Error: Error [ERR_REQUIRE_ESM]: require() of ES Module
|
|
412
|
+
|
|
413
|
+
This error is tracked by issue [#16](https://github.com/yao-pkg/pkg/issues/16#issuecomment-1945486658). Follow the link in oder to find a workaround.
|
|
414
|
+
|
|
415
|
+
In most cases adding `--options experimental-require-module` to `pkg` command line will solve the issue.
|
|
416
|
+
|
|
417
|
+
> [!NOTE]
|
|
418
|
+
> This option is not needed anymore starting from NodeJS v22.12.0
|
|
419
|
+
|
|
411
420
|
### Error: Cannot find module XXX (when using `child_process`)
|
|
412
421
|
|
|
413
422
|
When using `child_process` methods to run a new process pkg by default will invoke it using NodeJS runtime that is built into the executable. This means that if you are trying to spawn the packaged app itself you will get above error. In order to avoid this you must set `PKG_EXECPATH` env set to `""`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yao-pkg/pkg",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "Package your Node.js project into an executable",
|
|
5
5
|
"main": "lib-es5/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"@babel/generator": "^7.23.0",
|
|
26
26
|
"@babel/parser": "^7.23.0",
|
|
27
27
|
"@babel/types": "^7.23.0",
|
|
28
|
-
"@yao-pkg/pkg-fetch": "3.5.
|
|
28
|
+
"@yao-pkg/pkg-fetch": "3.5.21",
|
|
29
29
|
"into-stream": "^6.0.0",
|
|
30
30
|
"minimist": "^1.2.6",
|
|
31
31
|
"multistream": "^4.1.0",
|
|
32
32
|
"picocolors": "^1.1.0",
|
|
33
33
|
"picomatch": "^4.0.2",
|
|
34
34
|
"prebuild-install": "^7.1.1",
|
|
35
|
-
"resolve": "^1.22.
|
|
35
|
+
"resolve": "^1.22.10",
|
|
36
36
|
"stream-meter": "^1.0.4",
|
|
37
37
|
"tar": "^7.4.3",
|
|
38
38
|
"tinyglobby": "^0.2.11",
|