Build Fails Due to “Failed to Resolve Version 1 of Yarn” Without Any Config Changes
hainguyentien
HOBBYOP

4 months ago

Hi Railway team,

My deployment suddenly started failing with the following error message:

Failed to resolve version 1 of yarn

This occurred despite no changes being made to my Yarn configuration or lockfiles.
The logs show that the build environment is detecting and attempting to use Yarn 1:

↳ Using yarn1 package manager Failed to resolve version 1 of yarn

Railpack version:0.2.3
Region:asia-southeast1
Timestamp:Aug 6, 2025, 17:56 GMT+7

It was deploying fine before, and I didn’t change anything related to yarn, .yarnrc, or the package.json engines field.

Please let me know if there’s a change in the build image or if I should explicitly set something in my project config to resolve this.

Thanks!

Attachments

Solved

22 Replies

Railway
BOT

4 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


carterjc
PRO

4 months ago

Also experiencing this, unfortunately (us-east-4)


hainguyentien
HOBBYOP

4 months ago

I just try again today but still fail. Anyone get this too?


jake
EMPLOYEE

4 months ago

Could y'all please open an issue on the Railpack GitHub repo? We've got someone who can look at this this week

github.com/railwayapp/railpack


Status changed to Awaiting User Response Railway 4 months ago


hainguyentien
HOBBYOP

4 months ago

I've created new issue on Railpack but do you have any idea to hot fix it or work around for now? Because i really need to deploy. Thanks.


Status changed to Awaiting Railway Response Railway 4 months ago


jake
EMPLOYEE

4 months ago

You can try setting the properties to manually define your yarn version

see the railpack docs at https://railpack.com/


Status changed to Awaiting User Response Railway 4 months ago


prime-cave
HOBBY

4 months ago

I'm also currently experiencing the same issue.


Status changed to Awaiting Railway Response Railway 4 months ago


hainguyentien
HOBBYOP

4 months ago

I just resolved it just by change to using pnpm. Waiting support is hopeless.


spidertwin2
PRO

4 months ago

I have the same error, please look into it when possible.

Thanks!


hainguyentien

I just resolved it just by change to using pnpm. Waiting support is hopeless.

spidertwin2
PRO

4 months ago

Hey, I am sure they will resolve it to the earliest. Whenever I had technical issues in the past, Railway's support team has been very helpful. Let's be patient and give them some time to inspect the issue


jake
EMPLOYEE

4 months ago

A reproducible environment (aka opensource GitHub repo) would be super helpful. We've got someone looking into some Railpack issues this week and can defs have a look at this!


Status changed to Awaiting User Response Railway 4 months ago


angelmtztrc
HOBBY

4 months ago

changing the builder to nixpack solved the issue for me.


Status changed to Awaiting Railway Response Railway 4 months ago


michaelotis
HOBBY

4 months ago

Using Corepack and using Yarn 4 fixed it for me


jake
EMPLOYEE

4 months ago

As mentioned we'll have someone look at this this week. Looks like an upstream issue (Railpack depends on Mise)


Status changed to Awaiting User Response Railway 4 months ago


michaelotis

Using Corepack and using Yarn 4 fixed it for me

prime-cave
HOBBY

4 months ago

Thanks this Worked for me as well.


Status changed to Awaiting Railway Response Railway 4 months ago


mickythompson
FREE

4 months ago

Hey! I ran into this exact issue and solved it by switching to a Dockerfile approach.

The issue is that Railpack's Corepack is failing to resolve Yarn 1.22.22. While the exact cause it isn't clear, it appears to be related to how Corepack resolves specific Yarn versions -

possibly a compatibility issue or a registry problem.

The Dockerfile solution works because it bypasses Corepack entirely and installs Yarn directly from npm:

# Instead of using Corepack, install Yarn directly via npm

RUN rm -f .yarnrc \

&& rm -f .yarn/releases/yarn-1.22.22.cjs \

&& npm i -g yarn@1.22.22 --force \

&& yarn --version --no-default-rc

Key differences:

1. Direct npm installation: Uses npm i -g yarn@1.22.22, which pulls from the npm registry (where all Yarn versions are available.

2. Removes Yarn config conflicts: Cleans up .yarnrc and any local Yarn releases that might interfere.

3. Uses --no-default-rc: Ensures Yarn ignores any repository-specific configurations that might cause issues

This approach gives you full control over the Yarn installation process and avoids the Corepack version resolution issue entirely. Plus, you get the added benefits of Docker caching and more

predictable builds.

Hope this helps others facing the same issue!


jake

As mentioned we'll have someone look at this this week. Looks like an upstream issue (Railpack depends on Mise)

jake
EMPLOYEE

4 months ago

Indeed Dockerfile as mentioned above will work. But we will also be having a look at this looks like today, tomorrow, or latest early next week


Status changed to Awaiting User Response Railway 4 months ago


vacom
HOBBY

4 months ago

Any date for fixing this problem? I can't switch to Nixpacks, I'm having problems with Biome. Last week I was able to deploy without any problems with Railpack.


Status changed to Awaiting Railway Response Railway 4 months ago


We have someone staffed on this issue as we speak, no date, but actively being resolved.


Status changed to Awaiting User Response Railway 4 months ago


mikebianco
FREE

4 months ago

I'm helping out on this issue! I believe we've fixed it: could you retry any builds and let me know if you are still running into issues?

For those who are interested: it looks like what happened here is the mise yarn backend (asdf, for the current mise version used by railpack) was broken/corrupted for some amount of time. The latest version of mise (which we are updating) uses a different backend to avoid this issue, but the current asdf backend looks to be fixed, so builds that were failing should now work.


Status changed to Awaiting Railway Response Railway 4 months ago


mikebianco

I'm helping out on this issue! I believe we've fixed it: could you retry any builds and let me know if you are still running into issues?For those who are interested: it looks like what happened here is the mise yarn backend (asdf, for the current mise version used by railpack) was broken/corrupted for some amount of time. The latest version of mise (which we are updating) uses a different backend to avoid this issue, but the current asdf backend looks to be fixed, so builds that were failing should now work.

vacom
HOBBY

4 months ago

Hey Mike, thanks for sorting it out, I just did a build and it's working.


Sweet! Awaiting others to chime in to report a successful fix before we close this out.


Status changed to Awaiting User Response Railway 4 months ago


Railway
BOT

3 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 3 months ago


Loading...