a month ago
Service is building with older version of Bun, not respecting package.json:
scheduling build on Metal builder "builder-ffuywq"
unpacking archive
30.1 MB
126ms
using build driver railpack-v0.37.0
local://prepare-driver
0ms
local://prepare-context
0ms
uploading snapshot
17 MB
497ms
prepare railpack-v0.37.0
1s
╭─────────────────╮
│ Railpack 0.37.0 │
╰─────────────────╯
↳ Detected Node
↳ Using bun package manager
↳ Custom start command detected, skipping Caddy start
↳ Bun runtime detected
Packages
──────────
bun │ 1.3.14 │ package.json > engines > bun (>=1.4.0)
node │ 22.23.2 │ previous installed version (22)This is how package.json specifies Bun version:
"engines": {
"bun": ">=1.4.0"
},Mise has had support for Bun v1.4 as of 4 days ago: https://mise-tools.jdx.dev/tools/bun
11 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
mayori
Try configure the version via Service Variable `RAILPACK_BUN_VERSION=1.4`
a month ago
Never had to do that before and would prefer not to have another env variable. Engine in package.json should support according to railpack docs? Will try anyway.
jwaltz
Never had to do that before and would prefer not to have another env variable. Engine in package.json should support according to railpack docs? Will try anyway.
a month ago
Yeah, engine should work, how your current package.json looks like?
mayori
Yeah, engine should work, how your current `package.json` looks like?
a month ago
see OP at bottom
mayori
Yeah, engine should work, how your current `package.json` looks like?
a month ago
Removing engine in favor of env variable works. Railpack respects the env var. Perhaps its a bug that it isn't respecting engines? It doesn't work with both as engines in package.json seems to have higher priority.
jwaltz
Removing engine in favor of env variable works. Railpack respects the env var. Perhaps its a bug that it isn't respecting engines? It doesn't work with both as engines in package.json seems to have higher priority.
a month ago
Do you have packageManager field in your package.json?
mayori
Do you have `packageManager` field in your `package.json`?
a month ago
No
a month ago
Hey! Just set it on the packageManager field, I just deployed a Bun 1.4 app using Railpack.
"packageManager": "bun@1.4.0",
a month ago
The packageManager field only accepts specific versions. The engines field accepted >= semver range syntax. I'd like to see engines working again if possible
jwaltz
The `packageManager` field only accepts specific versions. The `engines` field accepted `>=` semver range syntax. I'd like to see `engines` working again if possible
a month ago
I recommend switching to a Dockerfile.
a month ago
I looked into this and we actually don't support contraints in package.json > engines, unfortunately. This is mainly because mise, which we use for version resolution, doesn't support them either.
However, this is something we could definitely improve in the future! I've created an issue to track it.
In the short term, specifying a patch version in engines or devEngines should force bun 1.4 to be used.
