Builds failing with error pnpm-lock.yaml file not found which is present

kamranahmedse
FREE

a year ago

Everything was working fine and suddenly I have started receiving the error saying that pnpm-lock.yaml file not found which is present

Here is the relevant portion of logs:

10 1.156 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "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/52ea459f-081e-48c6-ac24-1b46e4ddabe9-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile:

1.152  WARN  Ignoring not compatible lockfile at /app/pnpm-lock.yaml

1.156  ERRPNPMNO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies

a year ago

try adding a nixpacks.toml file to your project -

[phases.install]
    cmds = ["npm install -g corepack", "corepack enable", "corepack prepare pnpm@9.1.0 --activate", "pnpm install"]

Builds failing with error pnpm-lock.yaml file not found which is present - Railway Help Station