vfilanovsky-openai
|
16435f3561
|
Make sure bun can be installed on Alpine Linux (musl) on arm64 hardware (#22892)
### What does this PR do?
This PRs adjusts the "arch" string for Linux-musl variant to make sure
it can be installed on ARM64 platforms using `npm`. Without this fix,
installing bun on Alpine Linux on arm64 fails because the native binary
cannot be found.
#### Why it fails
Bun attempts to find/download the native binaries during the postinstall
phase (see
[install.ts](https://github.com/oven-sh/bun/blob/bun-v1.1.42/packages/bun-release/src/npm/install.ts)).
The platform matching logic lives in
[platform.ts](https://github.com/oven-sh/bun/blob/bun-v1.1.42/packages/bun-release/src/platform.ts).
Note how the "musl" variant is marked [as
"aarch64"](https://github.com/oven-sh/bun/blob/bun-v1.1.42/packages/bun-release/src/platform.ts#L63-L69),
while the regular "glibc" variant is marked [as
"arm64"](https://github.com/oven-sh/bun/blob/bun-v1.1.42/packages/bun-release/src/platform.ts#L44-L49).
On Alpine Linux distributions (or when using "node-alpine" docker image)
we're supposed to be using the "musl" binary. However, since bun marks
it as "aarch64" while the matching logic relies on `process.arch`, it
never gets matched. Node.js uses "arm64", _not_ "aarch64" (see
["process.arch"
docs](https://nodejs.org/docs/latest-v22.x/api/process.html#processarch)).
In short - a mismatch between the expected arch ("aarch64") and the
actual reported arch ("arm64") prevents bun from finding the right
binary when installing with npm/pnpm.
### How did you verify your code works?
Verified by running the installer on Alpine Linux on arm64.
cc @magus
|
2025-09-23 20:14:57 -07:00 |
|
Jarred Sumner
|
55a9cccac0
|
bun.sh -> bun.com (#20909)
|
2025-07-10 00:10:43 -07:00 |
|
Michael H
|
b9e72d0d2e
|
Make bunx work with npm i -g bun on windows (#20471)
|
2025-06-18 12:00:16 -07:00 |
|
Jarred Sumner
|
3f360b0682
|
chore: format packages/scripts folder (#19611)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
|
2025-05-12 17:12:17 -07:00 |
|
Ashcon Partovi
|
b4dce96c40
|
ci: Publish musl releases to npm
|
2024-12-04 10:19:15 -08:00 |
|
liudonghua
|
51bb5f3a04
|
Update platform.ts to fix isWindowsAVX2 implementation. (#10313)
The isWindowsAVX2 function is not working as expected due to the stdout endwith `\r\n`. So the simple `stdout == "True"` will never true.
|
2024-04-17 00:26:57 -07:00 |
|
dave caruso
|
0cdad4bebb
|
fix(bun-release): support windows in npm package (#9873)
* fix npm install on windows
* try again
* again
* copy less file
* revert changes
* remove package.json from git
* okay
* now?
|
2024-04-03 23:16:48 -07:00 |
|
Ashcon Partovi
|
1edacc6e49
|
Prepare npm i -g bun for Windows
|
2024-04-01 18:00:16 +09:00 |
|
Ashcon Partovi
|
69ee87d8e2
|
Add script to calculate semver for release
|
2023-02-01 14:53:57 -08:00 |
|
Ashcon Partovi
|
9c27b5d17f
|
Fix getting SHA for canary
|
2023-02-01 10:56:08 -08:00 |
|
Ashcon Partovi
|
73d6c888b9
|
Add bun-release package
|
2023-02-01 10:28:01 -08:00 |
|