yao-pkg / pkg

Package your Node.js project into an executable
https://www.npmjs.com/package/@yao-pkg/pkg
MIT License
312 stars 11 forks source link

Not able to create exe for x86 windows #69

Closed dhwaj1902 closed 3 months ago

dhwaj1902 commented 3 months ago

What version of pkg are you using?

4.3.8

What version of Node.js are you using?

18.17.0

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?

node10

Describe the Bug

I want to make a node exe for 32 bit windows, first I tried with pkg version 5.8.1, but unable to create for 32 bit(64 bit was working fine). But, when I downgrade my pkg version to 4.3.8, then I was not able to create for both (x64 as well as x86), showing the error:

Warning Cannot include addon %1 into executable. The addon must be distributed with executable as %2. D:****\node_modules\@serialport\bindings\build\Release\bindings.node path-to-executable/bindings.node

using the serialport version: ^10.0.0

I jumped to pkg 4.3.8 version because of this issue: https://github.com/vercel/pkg/issues/735

If anyone can help me to build for 32 bit windows.

Expected Behavior

Should work for 32 bit as well

To Reproduce

.

robertsLando commented 3 months ago

We don't have support for x86 win and we never have I think.

dhwaj1902 commented 2 months ago

Hi @robertsLando, thanks for replying. Yao-pkg/pkg might not have it, but vercel/pkg does have that. If you have any idea about that please give any suggestions.

robertsLando commented 2 months ago

@dhwaj1902 Maybe many years ago it had it supported, we dropped 32 bit supports for both arm and amd long time ago.

Problem is that it's not easy to maintain/build nodejs patches for those archs. What I can suggest is to manually build your patch and use it locally like explained here: https://github.com/yao-pkg/pkg-binaries