Closed ChandiraGunatilleke closed 4 months ago
Checking it on the latest version using: npx pkg -t node20-linux-armv7 index.js
Starts a new download fetched-v20.11.1-linuxstatic-armv7
but hangs in the process. That also ignores the downloaded binary built-v20.11.1-linux-armv7
.
each pkg version looks for a specific nodejs version, you should use the one that it expects (or you could also rename it the same way it expect to find)
I'm still having the same issue. I'm not sure what I'm doing wrong.
The steps I followed:
npx pkg -t node20-linux-armv7 index.js
: This results in the output on the first comment with pkg trying to compile it to binary from source.npx pkg -t node20-linuxstatic-armv7 index.js
: Which results in pkg downloading the binary but the process hanging without completing. Since I'm using the latest pkg version from the forked repo (@yao-pkg/pkg), it seems to me that I don't need to manually download the binary from the releases page of this repo (@yao-pkg/pkg-binaries).
Unsure of how to proceed further.
Came across: https://github.com/yao-pkg/pkg-fetch/
Which says only Node 16 and 18 are supported on ARMv7 and sure enough it worked. Posting it here incase someone else runs into the same issue as me.
I downloaded the binaries using curl into ~/.pkg-cache/custom. Then set the environment variables as mentioned in the README.
I am using the latest version of @yako-pkg/pkg. (v5.11.5).
Within my project folder I have a single index.js file. When I run the command:
npx pkg -t node16-linux-armv7 index.js
I get the following output:
It doesn't recognize the
built-v16.16.0-linux-armv7
binary within ~/.pkg-cache/custom and tries to build from source.I have both @yao-pkg/pkg and my project folders within WSL2 in my Windows machine with a x86 architecture. I need to cross compile into armv7 within this environment. Any help would be appreciated.