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:
35 Replies
Project ID:
e15ed82c-c15e-4b05-b9dc-06a185373d18,e15ed82c-c15e-4b05-b9dc-06a185373d18,e15ed82c-c15e-4b05-b9dc-06a185373d18
Good point, should've specified. I tried running and it changed nothing in my lockfile.
whats your local pnpm version, and what version is railway using?
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.
Solution
Oh thanks I tried looking for that
One second, committing and we'll see
Ok so this worked, but something's weird here
package.json
but no more lockfile missmatch errors?
Nope. the app deployed successfully
what node version do you use locally
18.16.1
It's running fine so I don't mind that rn, just wondering about Nixpacks still saying pnpm 7.x
looking into it
what version is your lockfile?
the version is on L#1 of the lockfile
Also just confirmed that the entire app is 100% working, it's just this curiousity
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
Like so, yes?
yep
btw I'm gonna mark this as solved since this is working and I hate having the status not be up-to-date
I now have more questions
more questions?
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
good news, i know why its not using pnpm 8
Do tell!
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
ok, but then why would it start working?
because corepack is installing pnpm v8 instead
Ah I see
ok that's the step I was missing
Anyways thanks for the help, you were awesome
so when you see that railway starts using nixpacks v1.11.0, you can remove the corepack stuff and it would use pnpm8 automatically
I'm just gonna be lazy and leave that there ngl
more deps equal longer build time
Well, fair
But I don't expect needing to update this app for a while
also fair
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
gotcha, well glad i could help solve it!