22 days ago
i swear i'm gonna cry please HELP
Attachments
22 Replies
22 days ago
This means the container build context does not contain a package.json at the root (/app). Everything else in the log is secondary.
22 days 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.jsonif this is a monorepo.{ "name": "root", "private": true, "workspaces": [ "workspace/*" ] }
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/*" ] }`
22 days 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
22 days ago
Please share:
railpack.jsonrailway.json- your repo structure (folders + where
package.jsonis), screenshot is fine.
That will make it possible to pinpoint exactly what’s pointing to the wrong path.
22 days 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  
22 days 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 infile treemode 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_
22 days 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 loggingAttachments
22 days 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.
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 ```
22 days 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.jsoninls -la - or
cat package.jsonfails
→ 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`.
22 days ago
22 days 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 /appThat 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→ yourrailpack.jsonis ignored - If you do see it → then path/debug continues
22 days 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
22 days ago
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
22 days ago
hello from RAILPACK worked
Attachments
22 days 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) .railwayignoreor.gitignoreis 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.
22 days ago
y
Attachments
22 days 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
22 days 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" } } 
22 days ago
Glad to help <3
Status changed to Open brody • 22 days 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" } } 
22 days 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
21 days ago
yeah done
Status changed to Open brody • 21 days ago
Status changed to Solved Anonymous • 21 days ago
