build fails with "ERR_PNPM_LOCKFILE_CONFIG_MISMATCH"

Pretty much what the title says. Following the Nixpacks command order works both on my computer and a friend's (pnpm i --frozen-lockfile -> pnpm build -> pnpm start) Full error:
#10 [stage-0 6/10] RUN --mount=type=cache,id=s/e15ed82c-c15e-4b05-b9dc-06a185373d18-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile

#10 1.213  ERR_PNPM_LOCKFILE_CONFIG_MISMATCH  Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile
#10 1.213
#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"

#10 ERROR: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1
-----
> [stage-0 6/10] RUN --mount=type=cache,id=s/e15ed82c-c15e-4b05-b9dc-06a185373d18-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile:
#10 1.213  ERR_PNPM_LOCKFILE_CONFIG_MISMATCH  Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile
#10 1.213

#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"
-----
Dockerfile:20
-------------------
18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH
19 | COPY . /app/.
20 | >>> RUN --mount=type=cache,id=s/e15ed82c-c15e-4b05-b9dc-06a185373d18-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile
21 |
22 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1
#10 [stage-0 6/10] RUN --mount=type=cache,id=s/e15ed82c-c15e-4b05-b9dc-06a185373d18-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile

#10 1.213  ERR_PNPM_LOCKFILE_CONFIG_MISMATCH  Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile
#10 1.213
#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"

#10 ERROR: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1
-----
> [stage-0 6/10] RUN --mount=type=cache,id=s/e15ed82c-c15e-4b05-b9dc-06a185373d18-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile:
#10 1.213  ERR_PNPM_LOCKFILE_CONFIG_MISMATCH  Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile
#10 1.213

#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"
-----
Dockerfile:20
-------------------
18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH
19 | COPY . /app/.
20 | >>> RUN --mount=type=cache,id=s/e15ed82c-c15e-4b05-b9dc-06a185373d18-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile
21 |
22 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1
35 Replies
Percy
Percy17mo ago
Project ID: e15ed82c-c15e-4b05-b9dc-06a185373d18,e15ed82c-c15e-4b05-b9dc-06a185373d18,e15ed82c-c15e-4b05-b9dc-06a185373d18
Brody
Brody17mo ago
#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"
#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"
Asseater Peter
Asseater PeterOP17mo ago
Good point, should've specified. I tried running
pnpm install --no-frozen-lockfile
pnpm install --no-frozen-lockfile
and it changed nothing in my lockfile.
Brody
Brody17mo ago
whats your local pnpm version, and what version is railway using?
Asseater Peter
Asseater PeterOP17mo ago
Dammit it might be that 😅 I have 8.6.3 and Railway is running 7.x What should I do here tho? I'd like to have this run, ideally without downgrading locally.
Asseater Peter
Asseater PeterOP17mo ago
Oh thanks I tried looking for that One second, committing and we'll see Ok so this worked, but something's weird here
Asseater Peter
Asseater PeterOP17mo ago
Asseater Peter
Asseater PeterOP17mo ago
package.json
Brody
Brody17mo ago
but no more lockfile missmatch errors?
Asseater Peter
Asseater PeterOP17mo ago
Nope. the app deployed successfully
Brody
Brody17mo ago
what node version do you use locally
Asseater Peter
Asseater PeterOP17mo ago
18.16.1 It's running fine so I don't mind that rn, just wondering about Nixpacks still saying pnpm 7.x
Brody
Brody17mo ago
looking into it what version is your lockfile? the version is on L#1 of the lockfile
Asseater Peter
Asseater PeterOP17mo ago
lockfileVersion: '6.0'
lockfileVersion: '6.0'
Also just confirmed that the entire app is 100% working, it's just this curiousity
Brody
Brody17mo ago
thats odd, nixpacks is setup to use pnpm-8_x if the lockfile version is 6 set engines.node to 18 in your package.json
Asseater Peter
Asseater PeterOP17mo ago
Like so, yes?
Brody
Brody17mo ago
yep
Asseater Peter
Asseater PeterOP17mo ago
btw I'm gonna mark this as solved since this is working and I hate having the status not be up-to-date
Asseater Peter
Asseater PeterOP17mo ago
I now have more questions
Brody
Brody17mo ago
more questions?
Asseater Peter
Asseater PeterOP17mo ago
Well, at first I thought "it clearly read the file and updated properly, it's just not showing it for some reason", but after this where you can see it is actually displaying it, yeah
Brody
Brody17mo ago
good news, i know why its not using pnpm 8
Asseater Peter
Asseater PeterOP17mo ago
Do tell!
Brody
Brody17mo ago
nixpacks v1.10.1 does not support pnpm-8 automatically v1.11.0 does though, and thats what i was looking at https://github.com/railwayapp/nixpacks/releases/tag/v1.11.0
Asseater Peter
Asseater PeterOP17mo ago
ok, but then why would it start working?
Brody
Brody17mo ago
because corepack is installing pnpm v8 instead
Asseater Peter
Asseater PeterOP17mo ago
Ah I see ok that's the step I was missing Anyways thanks for the help, you were awesome
Brody
Brody17mo ago
so when you see that railway starts using nixpacks v1.11.0, you can remove the corepack stuff and it would use pnpm8 automatically
Asseater Peter
Asseater PeterOP17mo ago
I'm just gonna be lazy and leave that there ngl
Brody
Brody17mo ago
more deps equal longer build time
Asseater Peter
Asseater PeterOP17mo ago
Well, fair But I don't expect needing to update this app for a while
Brody
Brody17mo ago
also fair
Asseater Peter
Asseater PeterOP17mo ago
The architecture here is kinda weird but this is not the main API That part is part of the Next.js code for efficiency and my convenience
Brody
Brody17mo ago
gotcha, well glad i could help solve it!
Want results from more Discord servers?
Add your server