@yao-pkg/pkg 6.3.0 → 6.3.2

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 CHANGED
@@ -408,6 +408,12 @@ 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
+
411
417
  ### Error: Cannot find module XXX (when using `child_process`)
412
418
 
413
419
  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.0",
3
+ "version": "6.3.2",
4
4
  "description": "Package your Node.js project into an executable",
5
5
  "main": "lib-es5/index.js",
6
6
  "license": "MIT",
@@ -32,10 +32,10 @@
32
32
  "picocolors": "^1.1.0",
33
33
  "picomatch": "^4.0.2",
34
34
  "prebuild-install": "^7.1.1",
35
- "resolve": "^1.22.0",
35
+ "resolve": "^1.22.10",
36
36
  "stream-meter": "^1.0.4",
37
37
  "tar": "^7.4.3",
38
- "tinyglobby": "^0.2.9",
38
+ "tinyglobby": "^0.2.11",
39
39
  "unzipper": "^0.12.3"
40
40
  },
41
41
  "devDependencies": {
@@ -1725,7 +1725,7 @@ function payloadFileSync(pointer) {
1725
1725
  fs.promises.read = util.promisify(fs.read);
1726
1726
  fs.promises.realpath = util.promisify(fs.realpath);
1727
1727
  fs.promises.fstat = util.promisify(fs.fstat);
1728
- fs.promises.statfs = util.promisify(fs.fstat);
1728
+ fs.promises.statfs = util.promisify(fs.statfs);
1729
1729
  fs.promises.access = util.promisify(fs.access);
1730
1730
 
1731
1731
  // TODO: all promises methods that try to edit files in snapshot should throw