R
Railway9mo ago
AlbertZ

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:
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...
Jump to solution
19 Replies
Percy
Percy9mo ago
Project ID: 6195fab7-3631-4239-bd50-6ededa78afb2,6195fab7-3631-4239-bd50-6ededa78afb2,6195fab7-3631-4239-bd50-6ededa78afb2,6195fab7-3631-4239-bd50-6ededa78afb2
Solution
Fragly
Fragly9mo ago
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:
[phases.install]
cmds = ["npm install -g [email protected] && corepack enable", "yarn install --check-cache"]
dependsOn = ["setup"]
[phases.install]
cmds = ["npm install -g [email protected] && corepack enable", "yarn install --check-cache"]
dependsOn = ["setup"]
AlbertZ
AlbertZ9mo ago
why Unsupported engine?
No description
Brody
Brody9mo ago
set engines.node to 20 in your package.json
AlbertZ
AlbertZ9mo ago
add nixpacks.toml, but still got this
No description
AlbertZ
AlbertZ9mo ago
No description
Brody
Brody9mo ago
it's also still on node 21, please show us how/where you have added the nixpacks.toml and set the engine version
AlbertZ
AlbertZ9mo ago
*
AlbertZ
AlbertZ9mo ago
No description
AlbertZ
AlbertZ9mo ago
its turbo project, add nixpacks.toml to apps/project
Brody
Brody9mo ago
what version do you use locally
AlbertZ
AlbertZ9mo ago
v16.16.0
Brody
Brody9mo ago
then please set it to just 16.16.0 as for the nixpacks.toml, does your service deploy from the root of the repo?
dennisthetennis_
after replace it still have different error log
No description
Brody
Brody9mo ago
do you think you could open your own help thread please?
AlbertZ
AlbertZ9mo ago
He's my colleague
Brody
Brody9mo ago
oh my bad in that case, could you send the build logs with this? https://bookmarklets.up.railway.app/log-downloader/
dennisthetennis_
after move the toml file to root dir the issue is solved, thanks everyone :salute:
Brody
Brody9mo ago
yeah i figured, happy you solved this!
Want results from more Discord servers?
Add your server