R
Railway10mo ago
AZ263

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
Percy10mo 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
Fragly10mo 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"]
AZ263
AZ263OP10mo ago
why Unsupported engine?
No description
Brody
Brody10mo ago
set engines.node to 20 in your package.json
AZ263
AZ263OP10mo ago
add nixpacks.toml, but still got this
No description
AZ263
AZ263OP10mo ago
No description
Brody
Brody10mo ago
it's also still on node 21, please show us how/where you have added the nixpacks.toml and set the engine version
AZ263
AZ263OP10mo ago
*
AZ263
AZ263OP10mo ago
No description
AZ263
AZ263OP10mo ago
its turbo project, add nixpacks.toml to apps/project
Brody
Brody10mo ago
what version do you use locally
AZ263
AZ263OP10mo ago
v16.16.0
Brody
Brody10mo 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_
dennisthetennis_10mo ago
after replace it still have different error log
No description
Brody
Brody10mo ago
do you think you could open your own help thread please?
AZ263
AZ263OP10mo ago
He's my colleague
Brody
Brody10mo ago
oh my bad in that case, could you send the build logs with this? https://bookmarklets.up.railway.app/log-downloader/
dennisthetennis_
dennisthetennis_10mo ago
after move the toml file to root dir the issue is solved, thanks everyone :salute:
Brody
Brody10mo ago
yeah i figured, happy you solved this!
Want results from more Discord servers?
Add your server