4 months ago
i have a project built with Bun, i tried everything to make it install and build with Bun, but it always says:
↳ Detected Node
↳ Using npm package manager
its a monorepo, i'm trying just to build the frontend right now.
0 Replies
tried setting the .env with RAILPACKBUNVERSION="1.2.4", all package.json start with Bun, tried setting the packageManager with Bun
4 months ago
bun is detected when there is a bun lock file
so i need to place a bun.lock file inside the frontend folder?
because right now my folder structure is something like
repo
|
|-> frontend
|-> server
where if u run bun i
inside repo folder, it downloads the node_modules and create the bun.lock inside repo
not inside frontend nor server
if i do cd frontend
and then bun i
bun just says: Checked 775 installs across 860 packages (no changes) [148.00ms]
4 months ago
never use cd
it's always a clear sign of incorrect config
4 months ago
is this an isolated or shared monorepo
4 months ago
then set your root directory to the desired folder
4 months ago
screenshot please
4 months ago
yes
4 months ago
do you have a bun lock file in that folder?
bun install --frozen-lockfile
process "bun install --frozen-lockfile" did not complete successfully: exit code: 1
4 months ago
full logs please
4 months ago
why did it not complete successfully
install mise packages: bun, node ✔ 2s
copy package.json
copy package.json ✔ 52ms
copy bun.lock
copy bun.lock ✔ 13ms
bun install --frozen-lockfile
docker-image://ghcr.io/railwayapp/railpack-runtime:latest ✔ 0ms – CACHED
copy /mise/shims
copy /mise/shims ✔ 12ms
bun install v1.2.4 (fd9a5ea6)
Resolving dependencies
Resolved, downloaded and extracted [66]
error: lockfile had changes, but lockfile is frozen
note: try re-running without --frozen-lockfile and commit the updated lockfile
✕ bun install --frozen-lockfile
process "bun install --frozen-lockfile" did not complete successfully: exit code: 1
ERROR: failed to solve: process "bun install --frozen-lockfile" did not complete successfully: exit code: 1
4 months ago
error: lockfile had changes, but lockfile is frozen
note: try re-running without --frozen-lockfile and commit the updated lockfile
i will probably try instead of setting the root directory, i will do
clone the repo, execute bun install at repo root, enter frontend folder, build, run start command from frontend folder
4 months ago
please do not do any of that, you need a bun lock file in the frontend folder that is frozen to the packages in the frontend folder, please do not over think this
yeah it worked, kinda of hassle actually because bun does not allow me to generate a lockfile only for the frontend
4 months ago
!s
Status changed to Solved brody • 4 months ago