Build error with Railpack: Failed to calculate checksum
dtknepper
PROOP

4 months ago

I have a NextJS project which I am currently reworking to a monorepo from a monolith. It has always been building with Nixpacks and it's been working great. But as soon as I do a build with Railpack I get a build error:

ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref klljwjh3b20wqwn6kx43802ts::50z0gq7dm90d5ld58qrw8p2fa: "/app/apps/api/node_modules/@donaraz/shared": not found

Is this something that is known?

Solved$10 Bounty

10 Replies

Railway
BOT

4 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


4 months ago

I bet this is related to this issue. Any chance you have npm ci in your build script? What does your package.json scripts look like?


mikebianco

I bet this is related to this issue. Any chance you have npm ci in your build script? What does your package.json scripts look like?

dtknepper
PROOP

4 months ago

Thanks for the reply! I actually don't have npm ci in any of my build scripts as far as I know.

My package.json is this:

{
  "name": "donaraz",
  "version": "0.1.4",
  "private": true,
  "workspaces": [
    "packages/*",
    "apps/*"
  ],
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "migrate": "prisma migrate deploy",
    "migrate_and_seed": "prisma migrate deploy && prisma db seed",
    "start": "next start",
    "lint": "next lint",
    "seed": "prisma db seed",
    "dev:api": "npm run dev --workspace=@donaraz/api",
    "dev:public": "npm run dev --workspace=@donaraz/public",
    "build:api": "npm run build --workspace=@donaraz/api",
    "build:public": "npm run build --workspace=@donaraz/public",
    "start:api": "npm run start --workspace=@donaraz/api",
    "start:public": "npm run start --workspace=@donaraz/public",
    "lint:api": "npm run lint --workspace=@donaraz/api",
    "lint:public": "npm run lint --workspace=@donaraz/public"
  },
  "dependencies": {
    "@aws-sdk/client-s3": "^3.717.0",
    "@aws-sdk/s3-request-presigner": "^3.717.0",
    "@mollie/api-client": "^4.3.0",
    "@prisma/client": "^6.16.3",
    "bcrypt": "^5.1.1",
    "isbot": "^5.1.12",
    "jose": "^5.9.6",
    "next": "15.4.2",
    "posthog-js": "^1.261.0",
    "posthog-node": "^5.8.1",
    "react": "19.1.0",
    "react-dom": "19.1.0",
    "resend": "^4.0.1",
    "@donaraz/shared": "file:./packages/shared",
    "@donaraz/components": "file:./packages/components"
  },
  "prisma": {
    "schema": "prisma/schema.prisma",
    "seed": "node prisma/seed_permissions_createAdmin.js"
  },
  "devDependencies": {
    "eslint": "^8",
    "eslint-config-next": "15.4.2",
    "prisma": "^6.16.3"
  }
}

4 months ago

Thanks for the response here. This is going to take me a bit more time to figure out as I need to dig into the workspace functionality and Turbo Pack a bit more, which I don't have as much experience in. I'll hopefully report back next week with some more information.


mikebianco

Thanks for the response here. This is going to take me a bit more time to figure out as I need to dig into the workspace functionality and Turbo Pack a bit more, which I don't have as much experience in. I'll hopefully report back next week with some more information.

dtknepper
PROOP

3 months ago

Did I see correctly you made a PR that fixed this error?


3 months ago

I remember encountering those errors while building an application as well. I might be wrong, but after redeploying a few times, the build eventually went through. However, Mike would know better about this issue.


3 months ago

I did merge the PR that caused an issue similar to this, but I don't think it will solve your specific issue. However, I am having trouble reproducing your exact problem locally. Could you give me more of your build log on the latest version so i can help figure out what is going wrong?


mikebianco

I did merge the PR that caused an issue similar to this, but I don't think it will solve your specific issue. However, I am having trouble reproducing your exact problem locally. Could you give me more of your build log on the latest version so i can help figure out what is going wrong?

dtknepper
PROOP

3 months ago

I actually just migrated to Railpack over the weekend so I think it solved my issue!


3 months ago

Oh that's great! Were you using nixpacks before? Or just an older version of railpack?


mikebianco

Oh that's great! Were you using nixpacks before? Or just an older version of railpack?

dtknepper
PROOP

3 months ago

Nixpack actually!


Status changed to Solved brody 3 months ago


Loading...