building got a error, but It was ok before...
#11 [stage-0 7/11] RUN --mount=type=cache,id=s/6195fab7-3631-4239-bd50-6ededa78afb2-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile
#11 0.481 Internal Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json'
#11 0.481 Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json'
#11 ERROR: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1
-----
[stage-0 7/11] RUN --mount=type=cache,id=s/6195fab7-3631-4239-bd50-6ededa78afb2-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile:0.481 Internal Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json' 0.481 Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json' ----- Dockerfile:21 ------------------- 19 | COPY . /app/. 20 | RUN --mount=type=cache,id=s/6195fab7-3631-4239-bd50-6ededa78afb2-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 npm install -g corepack && corepack enable 21 | >>> RUN --mount=type=cache,id=s/6195fab7-3631-4239-bd50-6ededa78afb2-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile 22 | 23 | # build phase ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1 Error: Docker build failed
Solution:Jump to solution
Nixpacks uses something known as
Corepack
internally, corepack recently pushed a bad that's causing issues in Railway's build process, and since nixpacks always uses the latest version- it's using that bad version by default.
For now, here's a workaround; add a nixpacks.toml
file in your app with the following content:
```toml...19 Replies
Project ID:
6195fab7-3631-4239-bd50-6ededa78afb2,6195fab7-3631-4239-bd50-6ededa78afb2,6195fab7-3631-4239-bd50-6ededa78afb2,6195fab7-3631-4239-bd50-6ededa78afb2
Solution
Nixpacks uses something known as
Corepack
internally, corepack recently pushed a bad that's causing issues in Railway's build process, and since nixpacks always uses the latest version- it's using that bad version by default.
For now, here's a workaround; add a nixpacks.toml
file in your app with the following content:
why Unsupported engine?
set
engines.node
to 20
in your package.jsonadd nixpacks.toml, but still got this
it's also still on node 21, please show us how/where you have added the nixpacks.toml and set the engine version
*
its turbo project, add nixpacks.toml to apps/project
what version do you use locally
v16.16.0
then please set it to just
16.16.0
as for the nixpacks.toml, does your service deploy from the root of the repo?after replace it still have different error log
He's my colleague
oh my bad
in that case, could you send the build logs with this? https://bookmarklets.up.railway.app/log-downloader/
after move the toml file to root dir the issue is solved, thanks everyone :salute:
yeah i figured, happy you solved this!