thienandangthanh
thienandangthanh
CDCloudflare Developers
Created by thienandangthanh on 12/31/2024 in #pages-help
Support bun new text-based lockfile
Since bun version 1.1.39, it supports new text-based lock file inplace of old binary lockfile. - https://bun.sh/blog/bun-v1.1.39#bun-lock-is-bun-s-new-text-based-lockfile - https://bun.sh/blog/bun-lock-text-lockfile In my repo, I replaced bun.lockb file with bun.lock But Cloudflare Pages can't detect that bun install --frozen-lockfile should be issued.
Using v2 root directory strategy
Success: Finished cloning repository files
Checking for configuration in a Wrangler configuration file (BETA)

No wrangler.toml file found. Continuing.
Detected the following tools from environment: [email protected], [email protected]
Installing bun 1.1.42
Downloading Bun v1.1.42...
Archive: /tmp/asdf-bun.ust9/bun.zip
inflating: /opt/buildhome/.asdf/downloads/bun/1.1.42/bun
Installing Bun v1.1.42...
Bun v1.1.42 is installed successfully!
Executing user command: bun run build
$ tsc && vite build
/usr/bin/bash: line 1: tsc: command not found
error: script "build" exited with code 127
Failed: Error while executing user command. Exited with error code: 127
Failed: build command exited with code: 1
Failed: error occurred while running build command
Using v2 root directory strategy
Success: Finished cloning repository files
Checking for configuration in a Wrangler configuration file (BETA)

No wrangler.toml file found. Continuing.
Detected the following tools from environment: [email protected], [email protected]
Installing bun 1.1.42
Downloading Bun v1.1.42...
Archive: /tmp/asdf-bun.ust9/bun.zip
inflating: /opt/buildhome/.asdf/downloads/bun/1.1.42/bun
Installing Bun v1.1.42...
Bun v1.1.42 is installed successfully!
Executing user command: bun run build
$ tsc && vite build
/usr/bin/bash: line 1: tsc: command not found
error: script "build" exited with code 127
Failed: Error while executing user command. Exited with error code: 127
Failed: build command exited with code: 1
Failed: error occurred while running build command
Current workaround is to include a bun.lockb file in repo. The file can be empty. It's used to make Cloudflare Pages know that we're using bun as package manager
2 replies