pkg
pkg copied to clipboard
Impossible to build for windows
What version of pkg are you using?
5.8.0
What version of Node.js are you using?
14.18.2
What operating system are you using?
Windows
What CPU architecture are you using?
AMD Ryzen 7 3700X
What Node versions, OSs and CPU architectures are you building for?
node14-win-x64
Describe the Bug
I have that error
> tools/v8_gypfiles/inspector.gypi
> tools/v8_gypfiles/toolchain.gypi
> tools/v8_gypfiles/v8.gyp
> tools/valgrind.supp
> vcbuild.bat
> Applying patches
> Error! Error: spawnSync patch ENOENT
at Object.spawnSync (internal/child_process.js:1077:20)
at spawnSync (child_process.js:776:24)
at C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:148:51
at step (C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:33:23)
at Object.next (C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:14:53)
at C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:8:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:4:12)
at spawn (C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:145:12)
at C:\Users\Valgrifer\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\build.js:221:60
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `pkg . --compress GZip -b`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Valgrifer\AppData\Roaming\npm-cache\_logs\2022-07-28T05_21_52_136Z-debug.log
Expected Behavior
build crash at > Applying patches
everytime, I search but I found no solution to fix it
To Reproduce
{
"name": "penumbramodmerge",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"bin": "./index.js",
"scripts": {
"run": "node index.js",
"build": "pkg . --compress GZip -b",
"help": "pkg -h"
},
"pkg": {
"scripts": "./*.js",
"targets": ["node14-win-x64"],
"outputPath": "build",
"output": "Merge.exe"
},
"keywords": [],
"author": "Valgrifer",
"license": "ISC",
"dependencies": {
}
}
my package.json, I didn't know what I can share to reproduce
If pkg tries to compile Node.js, either the host platform or the target platform is not supported.
Check https://github.com/vercel/pkg-fetch for supported platforms.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.