-
-
Notifications
You must be signed in to change notification settings - Fork 52
Description
What version of pkg are you using?
6.8.0
What version of Node.js are you using?
12.22.11
What operating system are you using?
Windows 10, Windows 11
What CPU architecture are you using?
x64
What Node versions, OSs and CPU architectures are you building for?
node12
Describe the Bug
I used to use vercel/pkg and it built the project with node12 and node18 without any problems. Today I switched to this project @yao-pkg. The problem is that the project will not build under node12. It seems to work without any problems with node18 and node22. I'm attaching the logs:
`pkg package.json -t node12-win
pkg@6.8.0
Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v12.22.11-win-x64 [ ] 0%
Error! 404: Not Found
Not found in remote cache:
{"tag":"v3.5","name":"node-v12.22.11-win-x64"}
Building base binary from source:
built-v12.22.11-win-x64
Fetching Node.js source archive from nodejs.org...
Extracting Node.js source archive...
Applying patches
Error! Error: spawnSync patch ENOENT
at Object.spawnSync (node:internal/child_process:1120:20)
at spawnSync (node:child_process:901:24)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:159:51
at step (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:33:23)
at Object.next (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:14:53)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:8:71
at new Promise ()
at __awaiter (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:4:12)
at spawn (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:156:12)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:242:60
at step (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:44:23)
at Object.next (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:25:53)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:19:71
at new Promise ()
at __awaiter (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:15:12)
at applyPatches (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:224:12)`
And if you copy fetched-v12.22.11-win-x64 to the directory "C:\Users\User.pkg-cache\v3.5"
`pkg package.json -t node12-win
pkg@6.8.0
Binary hash does NOT match. Re-fetching...
fetched-v12.22.11-win-x64 [ ] 0%
Error! 404: Not Found
Not found in remote cache:
{"tag":"v3.5","name":"node-v12.22.11-win-x64"}
Building base binary from source:
built-v12.22.11-win-x64
Fetching Node.js source archive from nodejs.org...
node-v12.22.11.tar.gz.sha256sum [====================] 100%
node-v12.22.11.tar.gz [====================] 100%
Extracting Node.js source archive...
Applying patches
Error! Error: spawnSync patch ENOENT
at Object.spawnSync (node:internal/child_process:1120:20)
at spawnSync (node:child_process:901:24)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:159:51
at step (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:33:23)
at Object.next (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:14:53)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:8:71
at new Promise ()
at __awaiter (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:4:12)
at spawn (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:156:12)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:242:60
at step (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:44:23)
at Object.next (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:25:53)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:19:71
at new Promise ()
at __awaiter (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:15:12)
at applyPatches (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:224:12)`
Expected Behavior
I would like it to be possible to build with node12, as sometimes support for Windows 7 and Windows Server is needed.
To Reproduce
`pkg package.json -t node12-win
pkg@6.8.0
Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v12.22.11-win-x64 [ ] 0%
Error! 404: Not Found
Not found in remote cache:
{"tag":"v3.5","name":"node-v12.22.11-win-x64"}
Building base binary from source:
built-v12.22.11-win-x64
Fetching Node.js source archive from nodejs.org...
Extracting Node.js source archive...
Applying patches
Error! Error: spawnSync patch ENOENT
at Object.spawnSync (node:internal/child_process:1120:20)
at spawnSync (node:child_process:901:24)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:159:51
at step (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:33:23)
at Object.next (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:14:53)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:8:71
at new Promise ()
at __awaiter (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:4:12)
at spawn (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\utils.js:156:12)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:242:60
at step (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:44:23)
at Object.next (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:25:53)
at C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:19:71
at new Promise ()
at __awaiter (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:15:12)
at applyPatches (C:\Users\User\AppData\Roaming\nvm\v22.19.0\node_modules@yao-pkg\pkg\node_modules@yao-pkg\pkg-fetch\lib-es5\build.js:224:12)`