#build fails with "ERR_PNPM_LOCKFILE_CONFIG_MISMATCH"

47 messages · Page 1 of 1 (latest)

abstract shard
#

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
sharp capeBOT
#

Project ID: e15ed82c-c15e-4b05-b9dc-06a185373d18,e15ed82c-c15e-4b05-b9dc-06a185373d18,e15ed82c-c15e-4b05-b9dc-06a185373d18

long wagon
#

#10 1.213 Update your lockfile using "pnpm install --no-frozen-lockfile"

abstract shard
#

Good point, should've specified. I tried running pnpm install --no-frozen-lockfile and it changed nothing in my lockfile.

long wagon
#

whats your local pnpm version, and what version is railway using?

abstract shard
#

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.

long wagon
abstract shard
#

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

long wagon
#

but no more lockfile missmatch errors?

abstract shard
#

Nope. the app deployed successfully

long wagon
#

what node version do you use locally

abstract shard
#

18.16.1

#

It's running fine so I don't mind that rn, just wondering about Nixpacks still saying pnpm 7.x

long wagon
#

looking into it

#

what version is your lockfile?

#

the version is on L#1 of the lockfile

abstract shard
#

lockfileVersion: '6.0'

#

Also just confirmed that the entire app is 100% working, it's just this curiousity

long wagon
#

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

abstract shard
#

Like so, yes?

long wagon
#

yep

abstract shard
#

btw I'm gonna mark this as solved since this is working and I hate having the status not be up-to-date

torn runeBOT
abstract shard
#

I now have more questions

long wagon
#

more questions?

abstract shard
#

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

long wagon
#

good news, i know why its not using pnpm 8

abstract shard
#

Do tell!

long wagon
#

nixpacks v1.10.1 does not support pnpm-8 automatically

abstract shard
#

ok, but then why would it start working?

long wagon
#

because corepack is installing pnpm v8 instead

abstract shard
#

Ah I see

#

ok that's the step I was missing

#

Anyways thanks for the help, you were awesome

long wagon
#

so when you see that railway starts using nixpacks v1.11.0, you can remove the corepack stuff and it would use pnpm8 automatically

abstract shard
#

I'm just gonna be lazy and leave that there ngl

long wagon
#

more deps equal longer build time

abstract shard
#

Well, fair
But I don't expect needing to update this app for a while

long wagon
#

also fair

abstract shard
#

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