janhq/jan

bug: Build fails with 404 error when downloading bun-darwin-x86.zip

Opened this issue · 0 comments

Version: dev

Describe the Bug

When building Jan on macOS, the build process fails with a 404 error when trying to download bun-darwin-x86.zip from the Bun repository.

Error Details

Starting main function
bunPlatform: darwin-x86, uvPlatform: x86_64-apple-darwin
Downloading Bun for darwin-x86...
Downloading https://github.com/oven-sh/bun/releases/latest/download/bun-darwin-x86.zip to scripts/dist/bun-darwin-x86.zip
Response status code: 302
Redirecting to https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-darwin-x86.zip
Downloading https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-darwin-x86.zip to scripts/dist/bun-darwin-x86.zip
Response status code: 404
Error: Failed to get 'https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-darwin-x86.zip' (404)
gmake: *** [Makefile:131: build] Error 1

Problem Analysis

The issue appears to be that:

The build script is detecting the platform as darwin-x86. It's trying to download bun-darwin-x86.zip from Bun releases. However, Bun no longer provides darwin-x86 builds - they now provide darwin-x64 builds instead

Expected Behavior

The build should successfully download the appropriate Bun binary for macOS (x86_64) systems.

Suggested Solution

The platform detection logic should be updated to correctly identify macOS Intel systems as darwin-x64 instead of darwin-x86, and the download URLs should be updated accordingly.

Steps to Reproduce

  1. Clone the Jan repository
  2. Run make dev or make build
  3. The build fails with the 404 error

Operating System

macOS (Intel/x86_64)