ERR_PNPM_NO_PKG_MANIFEST  No package.json found in /app
Anonymous
FREEOP

2 months ago

i swear i'm gonna cry please HELP

image.png

Attachments

Solved$10 Bounty

22 Replies

i-smuglov
FREE

2 months ago

This means the container build context does not contain a package.json at the root (/app). Everything else in the log is secondary.


i-smuglov
FREE

2 months ago

Fix:

  • Either set the Root Directory to where your actual app lives (e.g. workspace/api-server). (Service Settings > Root Directory)
  • Or add a root package.json if this is a monorepo. { "name": "root", "private": true, "workspaces": [ "workspace/*" ] }

Anonymous
FREEOP

2 months ago

@pepper ?


i-smuglov

Fix: * Either set the **Root Directory** to where your actual app lives (e.g. `workspace/api-server`). (Service Settings > Root Directory) * Or add a root `package.json` if this is a monorepo. `{ "name": "root", "private": true, "workspaces": [ "workspace/*" ] }`

Anonymous
FREEOP

2 months ago

i already have package.json since its monorepo but i also have railpack.json and railway.json


i already have package.json since its monorepo but i also have railpack.json and railway.json

i-smuglov
FREE

2 months ago

Please share:

  • railpack.json
  • railway.json
  • your repo structure (folders + where package.json is), screenshot is fine.

That will make it possible to pinpoint exactly what’s pointing to the wrong path.


Anonymous
FREEOP

2 months ago

  • railpack.json

{

"$schema": "https://schema.railpack.com",

"provider": "node",

"packages": {

"node": "20",

"pnpm": "9.15.9"

},

"env": {

"NODE_ENV": "development",

"CI": "true",

"NPM_CONFIG_PRODUCTION": "false"

},

"steps": {

"install": {

"commands": [

"pnpm install --no-frozen-lockfile --prod=false"

]

},

"build": {

"inputs": [{ "step": "install" }],

"commands": [

"pnpm --filter @workspace/api-server run build:prod"

]

}

},

"deploy": {

"startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs"

}

}

  • railway.json

{

"$schema": "https://railway.app/railway.schema.json",

"build": {

"builder": "RAILPACK"

},

"deploy": {

"startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs",

"healthcheckPath": "/api/healthz",

"healthcheckTimeout": 300,

"restartPolicyType": "ON_FAILURE",

"numReplicas": 1

}

}

package.json

{

"name": "workspace",

"packageManager": "pnpm@9.15.9",

"engines": {

"node": "20"

},

"version": "0.0.0",

"license": "MIT",

"scripts": {

"db:push": "pnpm --filter @workspace/db run push",

"build": "pnpm --filter @workspace/api-server run build:prod",

"build:all": "pnpm -r run build",

"typecheck:libs": "tsc --build",

"typecheck": "echo 'typecheck skipped (production build uses esbuild)'"

},

"pnpm": {

"frozen-lockfile": false

},

"private": true,

"devDependencies": {

"prettier": "^3.8.1",

"tsx": "catalog:",

"typescript": "~5.9.2"

},

"dependencies": {

"sharp": "^0.34.5"

}

}

package.json is outside all the folder not inside anything


* `railpack.json` { "$schema": "<https://schema.railpack.com>", "provider": "node", "packages": { "node": "20", "pnpm": "9.15.9" }, "env": { "NODE\_ENV": "development", "CI": "true", "NPM\_CONFIG\_PRODUCTION": "false" }, "steps": { "install": { "commands": \[ "pnpm install --no-frozen-lockfile --prod=false" \] }, "build": { "inputs": \[{ "step": "install" }\], "commands": \[ "pnpm --filter @workspace/api-server run build:prod" \] } }, "deploy": { "startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs" } } * `railway.json` { "$schema": "<https://railway.app/railway.schema.json>", "build": { "builder": "RAILPACK" }, "deploy": { "startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs", "healthcheckPath": "/api/healthz", "healthcheckTimeout": 300, "restartPolicyType": "ON\_FAILURE", "numReplicas": 1 } } `package.json` { "name": "workspace", "packageManager": "pnpm@9.15.9", "engines": { "node": "20" }, "version": "0.0.0", "license": "MIT", "scripts": { "db:push": "pnpm --filter @workspace/db run push", "build": "pnpm --filter @workspace/api-server run build:prod", "build:all": "pnpm -r run build", "typecheck:libs": "tsc --build", "typecheck": "echo 'typecheck skipped (production build uses esbuild)'" }, "pnpm": { "frozen-lockfile": false }, "private": true, "devDependencies": { "prettier": "^3.8.1", "tsx": "catalog:", "typescript": "\~5.9.2" }, "dependencies": { "sharp": "^0.34.5" } } package.json is outside all the folder not inside anything ![](https://station-server.railway.com/attachments/att_01kqg8y61dfext9ewbwpk4x3tw) ![](https://station-server.railway.com/attachments/att_01kqg8zqhtfq9v6w03vpndhmwq)

i-smuglov
FREE

2 months ago

Even if railway.json doesn’t specify it, Railway UI might have Root Directory set.

Check in Railway dashboard:

  • Service → Settings → Root Directory
  • If it’s anything other than empty or . → that’s the issue Pro tip: Try to provide the file structure in file tree mode in the future - it is much easier to read

i-smuglov

Even if `railway.json` doesn’t specify it, Railway UI might have **Root Directory** set. Check in Railway dashboard: * Service → Settings → **Root Directory** * If it’s anything other than empty or `.` → that’s the issue _Pro tip: Try to provide the file structure in_ `file tree` _mode in the future - it is much easier to read_

Anonymous
FREEOP

2 months ago

well the root is empty so i doubt its the issue

monorepo/
├── artifacts/
│   ├── api-server/        Express 5 API — all business logic and integrations
│   ├── digor-crm/         React + Vite CRM portal  (/crm/)
│   ├── digor-tools/       React + Vite internal tools (/tools/)
│   └── digor-website/     React + Vite public marketing site (/)
├── lib/
│   ├── api-spec/          OpenAPI 3.1 spec + Orval codegen config
│   ├── api-client-react/  Generated React Query hooks
│   ├── api-zod/           Generated Zod schemas
│   └── db/                Drizzle ORM schema + PostgreSQL connection
└── scripts/               One-off utility scripts (seeding, migrations)
artifacts/api-server/src/
├── routes/
│   ├── crm/
│   │   ├── leads.ts          # Core deal routes + all AI endpoints
│   │   ├── comps.ts          # Comparable sales CRUD + adjustment math
│   │   ├── sequences.ts      # Email sequence management
│   │   ├── auth.ts           # JWT login/session
│   │   └── ...               # campaigns, users, tasks, links, stats, buyers
│   ├── tools.ts              # Tools portal: skip trace, distressed, ARV, lookup
│   ├── signalwire.ts         # SignalWire webhook + message retrieval
│   ├── openphone.ts          # OpenPhone webhook + message retrieval
│   └── stripe.ts             # Stripe checkout + webhook
├── services/
│   ├── attomApi.ts           # ATTOM client with key rotation + fetchAttomAvm
│   ├── propertyApi.ts        # Adjustment math + AI price-per-sqft fallback
│   └── emailService.ts       # Nodemailer SMTP wrapper
└── lib/
    └── logger.ts             # Pino structured logging

Attachments


i-smuglov
FREE

2 months ago

You can also temporarily modify install step:

"install": {
  "commands": [
    "pwd",
    "ls -la",
    "pnpm install --no-frozen-lockfile --prod=false"
  ]
}

This will confirm what actually exists in /app.


![](https://station-server.railway.com/attachments/att_01kqga04jdesqvv6xer24cq4mx)well the root is empty so i doubt its the issue ``` monorepo/ ├── artifacts/ │ ├── api-server/ Express 5 API — all business logic and integrations │ ├── digor-crm/ React + Vite CRM portal (/crm/) │ ├── digor-tools/ React + Vite internal tools (/tools/) │ └── digor-website/ React + Vite public marketing site (/) ├── lib/ │ ├── api-spec/ OpenAPI 3.1 spec + Orval codegen config │ ├── api-client-react/ Generated React Query hooks │ ├── api-zod/ Generated Zod schemas │ └── db/ Drizzle ORM schema + PostgreSQL connection └── scripts/ One-off utility scripts (seeding, migrations) ``` ``` artifacts/api-server/src/ ├── routes/ │ ├── crm/ │ │ ├── leads.ts # Core deal routes + all AI endpoints │ │ ├── comps.ts # Comparable sales CRUD + adjustment math │ │ ├── sequences.ts # Email sequence management │ │ ├── auth.ts # JWT login/session │ │ └── ... # campaigns, users, tasks, links, stats, buyers │ ├── tools.ts # Tools portal: skip trace, distressed, ARV, lookup │ ├── signalwire.ts # SignalWire webhook + message retrieval │ ├── openphone.ts # OpenPhone webhook + message retrieval │ └── stripe.ts # Stripe checkout + webhook ├── services/ │ ├── attomApi.ts # ATTOM client with key rotation + fetchAttomAvm │ ├── propertyApi.ts # Adjustment math + AI price-per-sqft fallback │ └── emailService.ts # Nodemailer SMTP wrapper └── lib/ └── logger.ts # Pino structured logging ```

i-smuglov
FREE

2 months ago

Root being empty in UI doesn’t guarantee it’s actually empty at build time.

Add a quick debug step to print what actually exists in /app during build.

Update your railpack.json install step:

"install": {
  "commands": [
    "echo ROOT CHECK",
    "pwd",
    "ls -la",
    "echo PACKAGE CHECK",
    "cat package.json || echo 'no package.json'",
    "pnpm install --no-frozen-lockfile --prod=false"
  ]
}

Then redeploy and check logs.

What you’re looking for

If you see:

  • no package.json in ls -la
  • or cat package.json fails

→ Railway is building the wrong directory.

If you do see it:

  • then the issue is workspace resolution (pnpm config), not root path

This is the fastest way to remove guesswork and see exactly what Railpack mounted into /app.


i-smuglov

Root being empty in UI doesn’t guarantee it’s actually empty at build time. Add a quick debug step to print what actually exists in `/app` during build. Update your `railpack.json` install step: ``` "install": { "commands": [ "echo ROOT CHECK", "pwd", "ls -la", "echo PACKAGE CHECK", "cat package.json || echo 'no package.json'", "pnpm install --no-frozen-lockfile --prod=false" ] } ``` Then redeploy and check logs. ### What you’re looking for If you see: * no `package.json` in `ls -la` * or `cat package.json` fails → Railway is building the wrong directory. If you _do_ see it: * then the issue is workspace resolution (pnpm config), not root path This is the fastest way to remove guesswork and see exactly what Railpack mounted into `/app`.

Anonymous
FREEOP

2 months ago

same error i think


i-smuglov
FREE

2 months ago

Your debug step didn’t run, which is important.

The log still shows only:

pnpm install --no-frozen-lockfile --prod=false
ERR_PNPM_NO_PKG_MANIFEST No package.json found in /app

That means one of two things:

1) Your railpack.json is not being used

Railway might be ignoring it and using default build behavior.

2) Different service / wrong repo path

The service might not be building the repo root you think it is.

Verify this directly

Add something impossible to miss:

"install": {
  "commands": [
    "echo 'HELLO FROM RAILPACK'",
    "exit 1"
  ]
}

Redeploy.

Result:

  • If you don’t see HELLO FROM RAILPACK → your railpack.json is ignored
  • If you do see it → then path/debug continues

Anonymous
FREEOP

2 months ago

its not wrong repo i can even make it public on github


i-smuglov

Your debug step didn’t run, which is important. The log still shows only: ``` pnpm install --no-frozen-lockfile --prod=false ERR_PNPM_NO_PKG_MANIFEST No package.json found in /app ``` That means one of two things: ### 1) Your `railpack.json` is not being used Railway might be ignoring it and using default build behavior. ### 2) Different service / wrong repo path The service might not be building the repo root you think it is. ### Verify this directly Add something impossible to miss: ``` "install": { "commands": [ "echo 'HELLO FROM RAILPACK'", "exit 1" ] } ``` Redeploy. Result: * If you **don’t** see `HELLO FROM RAILPACK` → your `railpack.json` is ignored * If you **do** see it → then path/debug continues

Anonymous
FREEOP

2 months ago

i guess Railpack.json is being ignored i should delete one of those json


i-smuglov

Your debug step didn’t run, which is important. The log still shows only: ``` pnpm install --no-frozen-lockfile --prod=false ERR_PNPM_NO_PKG_MANIFEST No package.json found in /app ``` That means one of two things: ### 1) Your `railpack.json` is not being used Railway might be ignoring it and using default build behavior. ### 2) Different service / wrong repo path The service might not be building the repo root you think it is. ### Verify this directly Add something impossible to miss: ``` "install": { "commands": [ "echo 'HELLO FROM RAILPACK'", "exit 1" ] } ``` Redeploy. Result: * If you **don’t** see `HELLO FROM RAILPACK` → your `railpack.json` is ignored * If you **do** see it → then path/debug continues

Anonymous
FREEOP

2 months ago

hello from RAILPACK worked

Attachments


i-smuglov
FREE

2 months ago

Ok, so Railpack is actually working. That means the issue is the build context.

Right now /app inside the container doesn’t contain your root package.json, even though it exists in your repo.

Most likely causes:

  • Root Directory is set in Railway UI (even if you didn’t set it in railway.json)
  • .railwayignore or .gitignore is excluding files
  • Service is pointing to a subfolder

Next step: replace install with this to inspect /app:

"commands": [
  "pwd",
  "ls -la",
  "find . -maxdepth 2 -name package.json"
]

This will show exactly what Railway actually copied into the container.


i-smuglov

Ok, so Railpack is actually working. That means the issue is the build context. Right now `/app` inside the container doesn’t contain your root `package.json`, even though it exists in your repo. Most likely causes: * Root Directory is set in Railway UI (even if you didn’t set it in `railway.json`) * `.railwayignore` or `.gitignore` is excluding files * Service is pointing to a subfolder Next step: replace install with this to inspect `/app`: ``` ``` ``` "commands": [ "pwd", "ls -la", "find . -maxdepth 2 -name package.json" ] ``` This will show exactly what Railway actually copied into the container.

Anonymous
FREEOP

2 months ago

y

Attachments


Anonymous
FREEOP

2 months ago

{

"$schema": "https://schema.railpack.com",

"provider": "node",

"packages": {

"node": "20",

"pnpm": "9.15.9"

},

"steps": {

"install": {

"inputs": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml", "**/package.json"],

"commands": [

"pnpm install --no-frozen-lockfile"

]

},

"build": {

"inputs": [{ "step": "install" }, "."],

"commands": [

"pnpm --filter @workspace/api-server run build:prod"

]

}

},

"deploy": {

"startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs"

}

}

i will update it to this and try


Anonymous
FREEOP

2 months ago

actually i fixed it by using this code and it worked , thanks for helping with the Troubleshooting

{

"$schema": "https://railpack.com",

"provider": "node",

"packages": {

"node": "20",

"pnpm": "9.15.9"

},

"variables": {

"NPM_CONFIG_PRODUCTION": "false"

},

"deploy": {

"startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs"

}

}

Attachments


actually i fixed it by using this code and it worked , thanks for helping with the Troubleshooting { "$schema": "<https://railpack.com>", "provider": "node", "packages": { "node": "20", "pnpm": "9.15.9" }, "variables": { "NPM\_CONFIG\_PRODUCTION": "false" }, "deploy": { "startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs" } } ![](https://station-server.railway.com/attachments/att_01kqge046xe4ese7spmgawancc)

i-smuglov
FREE

2 months ago

Glad to help <3


Status changed to Open brody 2 months ago


actually i fixed it by using this code and it worked , thanks for helping with the Troubleshooting { "$schema": "<https://railpack.com>", "provider": "node", "packages": { "node": "20", "pnpm": "9.15.9" }, "variables": { "NPM\_CONFIG\_PRODUCTION": "false" }, "deploy": { "startCommand": "node --enable-source-maps artifacts/api-server/dist/index.mjs" } } ![](https://station-server.railway.com/attachments/att_01kqge046xe4ese7spmgawancc)

i-smuglov
FREE

2 months ago

Please mark the answer that helped you as accepted so the bounty can be processed <3


i-smuglov

Please mark the answer that helped you as `accepted` so the bounty can be processed <3

Anonymous
FREEOP

2 months ago

yeah done


Status changed to Open brody 2 months ago


Status changed to Solved Anonymous 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...