vercel / pkg

Package your Node.js project into an executable
https://npmjs.com/pkg
MIT License
24.33k stars 1.02k forks source link

error -4096??? #1939

Closed xhyabunny closed 1 year ago

xhyabunny commented 1 year ago

What version of pkg are you using?

5.8.1

What version of Node.js are you using?

18.12.1

What operating system are you using?

Windows

What CPU architecture are you using?

x64

What Node versions, OSs and CPU architectures are you building for?

node18

Describe the Bug

i run pkg . with this package.json

{
  "name": "chat-app",
  "bin": "bin/www",
  "version": "1.0.0",
  "description": "little test app",
  "author": "xhyabunny",
  "license": "ISC",
  "scripts": {
    "start": "node ./bin/www",
    "app": "nodemon ./bin/www"
  },
  "dependencies": {
    "cookie-parser": "~1.4.4",
    "debug": "~2.6.9",
    "express": "~4.16.1",
    "http-errors": "~1.6.3",
    "morgan": "~1.9.1",
    "nodemon": "^2.0.22",
    "pug": "2.0.0-beta11"
  },
    "pkg": {
    "scripts": ["app.js", "routes/*.js", "bin/*.js"],
    "assets": ["views/*", "public/stylesheets/style.css"],
    "targets": [ "node16-win-arm64" ],
    "outputPath": "dist"
  }
}

and i get this in my console?

> pkg@5.8.1
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v18.5.0-win-arm64           [====================] 100%

node:internal/child_process:413
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at ChildProcess.spawn (node:internal/child_process:413:11)
    at spawn (node:child_process:743:9)
    at fabricate (C:\Users\Usuario\AppData\Roaming\npm\node_modules\pkg\lib-es5\fabricator.js:55:51)
    at fabricateTwice (C:\Users\Usuario\AppData\Roaming\npm\node_modules\pkg\lib-es5\fabricator.js:120:5)        
    at MultiStream._queue (C:\Users\Usuario\AppData\Roaming\npm\node_modules\pkg\lib-es5\producer.js:271:68)     
    at MultiStream._next (C:\Users\Usuario\AppData\Roaming\npm\node_modules\pkg\node_modules\multistream\index.js:86:12)
    at Meter.onEnd (C:\Users\Usuario\AppData\Roaming\npm\node_modules\pkg\node_modules\multistream\index.js:129:12)
    at Object.onceWrapper (node:events:627:28)
    at Meter.emit (node:events:513:28)
    at endReadableNT (node:internal/streams/readable:1359:12) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}

Node.js v18.12.1

Expected Behavior

i dont really need to add anything here since its literally the reason pkg is made for (compiling node projects into EXE files)

To Reproduce

execute npm i in the console execute npm i pkg -g in the console make up package.json with previously mentioned info execute pkg . in the console

OneCricketeer commented 1 year ago

Double check all the versions you've mentioned...

  1. You stated you are using x64, but the logs include arm64, as do your targets
  2. You stated you are using Node 18.12, but
    1. the logs say 18.5
    2. targets say Node16
github-actions[bot] commented 1 year ago

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

github-actions[bot] commented 1 year ago

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.