Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Unable to build 32bit executables on 5.x #1634

Description

@SagePacheco

What version of pkg are you using?

5.7.0 but applies to all 5.x

What version of Node.js are you using?

16.15.0 64 and 32bit

What operating system are you using?

Windows 10

What CPU architecture are you using?

x86_64

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

node16-win-x86

Describe the Bug

PKG 5.x seems to be choking on any attempt to build a 32bit executable.

Beginning snippet:
`

pkg-test@1.0.0 build
pkg .

pkg@5.7.0
Fetching base Node.js binaries to PKG_CACHE_PATH

Error! 404: Not Found
Not found in remote cache:
{"tag":"v3.4","name":"node-v16.15.0-win-x86"}
Building base binary from source:
built-v16.15.0-win-x86
Fetching Node.js source archive from nodejs.org...
Extracting Node.js source archive...
`

Then it goes into verbose debug mode where it starts listing directories (small chunk for an example):
`

benchmark/
benchmark/README.md
benchmark/_benchmark_progress.js
benchmark/_cli.R
benchmark/_cli.js
benchmark/_http-benchmarkers.js
benchmark/_test-double-benchmarker.js
`

Then after listing directories it ends with an error stack:
`

Applying patches
Error! Error: spawnSync patch ENOENT
at Object.spawnSync (node:internal/child_process:1111:20)
at spawnSync (node:child_process:814:24)
at
`

Expected Behavior

I have been able to successfully build my project on 4.5.1 with target node14-win-x86 (No available node version satisfies 'node16'), but would like to update to 5.x for compression and other benefits.

I can use 5.x to build my project for basically any node version at 64 bit. Would like to do the same for 32 bit.

To Reproduce

From my findings, trying to build any project using 5.x with a 32 bit target will fail.
Here are my package.json details for reference:

"scripts": { "build": "pkg ." }, "pkg": { "outputPath": "dist", "targets": [ "node16-win-x86" ] }, "dependencies": { "pkg": "5.7.0" },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions