Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nixpacks Bug Report - bun command not found after deploy to railway #1274

Closed
1 task done
0xMALVEE opened this issue Jan 25, 2025 · 4 comments
Closed
1 task done

Nixpacks Bug Report - bun command not found after deploy to railway #1274

0xMALVEE opened this issue Jan 25, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@0xMALVEE
Copy link

0xMALVEE commented Jan 25, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

bun command is not found in railway after deployment. Sometimes it works without issues in my other repos but sometimes it just doesn't work.
Image

What I have tried:
I tried to add nixpacks.toml , but still no luck it just doesn't work

[phases.setup]
nixpkgsArchive = 'c1d2c1d6ca36b8183ec48d789a0b8ac432a3bd8b'

[deploy]
startCommand = 'bun run ./src/index.ts'

This is my package.json for referance

{
  "name": "nextjs",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev:web": "next dev --turbo",
    "build": "next build",
    "start:web": "next start",
    "lint": "next lint",
    "db:generate": "drizzle-kit generate:pg",
    "db:push": "drizzle-kit push:pg",
    "db:studio": "drizzle-kit studio",
    "db:drop": "drizzle-kit drop",
    "start": "bun run ./src/index.ts",
    "dev": "next dev --turbo"
  },
  "dependencies": {
    "@hookform/resolvers": "^3.10.0",
    "@radix-ui/react-checkbox": "^1.1.3",
    "@radix-ui/react-dialog": "^1.1.2",
    "@radix-ui/react-dropdown-menu": "^2.1.2",
    "@radix-ui/react-label": "^2.1.0",
    "@radix-ui/react-popover": "^1.1.2",
    "@radix-ui/react-radio-group": "^1.2.2",
    "@radix-ui/react-scroll-area": "^1.2.0",
    "@radix-ui/react-select": "^2.1.2",
    "@radix-ui/react-separator": "^1.1.0",
    "@radix-ui/react-slot": "^1.1.1",
    "@radix-ui/react-tabs": "^1.1.1",
    "@radix-ui/react-toast": "1.2.4",
    "@radix-ui/react-toggle": "^1.1.0",
    "@react-google-maps/api": "^2.20.5",
    "@slapinc/slappos-client": "1.2.5",
    "@tanstack/react-query": "^5.59.16",
    "@tiptap/pm": "^2.9.0",
    "@tiptap/react": "^2.9.0",
    "@tiptap/starter-kit": "^2.9.0",
    "@types/node": "22.7.8",
    "@types/pg": "^8.11.0",
    "@types/react": "npm:types-react@rc",
    "@types/react-dom": "npm:types-react-dom@rc",
    "ai": "^3.4.18",
    "autoprefixer": "10.4.20",
    "axios": "^1.7.7",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "cmdk": "^0.2.1",
    "discord-interactions": "^4.1.0",
    "discord.js": "^14.17.3",
    "dotenv": "^16.4.7",
    "drizzle-orm": "^0.29.3",
    "elysia": "^1.2.10",
    "embla-carousel-react": "^8.5.2",
    "eslint": "^9.13.0",
    "eslint-config-next": "15.0.0",
    "framer-motion": "12.0.0-alpha.1",
    "jose": "^5.9.6",
    "leaflet": "^1.9.4",
    "lowlight": "^3.1.0",
    "lucide-react": "^0.453.0",
    "next": "15.0.0",
    "next-auth": "^4.24.10",
    "next-cloudinary": "^6.16.0",
    "next-themes": "^0.3.0",
    "novel": "^0.5.0",
    "openai": "^4.68.2",
    "pg": "^8.11.3",
    "postcss": "8.4.47",
    "postgres": "^3.4.3",
    "react": "19.0.0-rc-65a56d0e-20241020",
    "react-dom": "19.0.0-rc-65a56d0e-20241020",
    "react-error-boundary": "^4.1.2",
    "react-hook-form": "^7.54.2",
    "react-hot-toast": "^2.4.1",
    "react-icons": "^5.3.0",
    "react-leaflet": "^5.0.0",
    "react-markdown": "^9.0.1",
    "react-use-cart": "^1.14.0",
    "sonner": "^1.5.0",
    "tailwind-merge": "^2.5.4",
    "tailwindcss": "3.4.14",
    "tailwindcss-animate": "^1.0.7",
    "ts-pattern": "^5.5.0",
    "typescript": "5.6.3",
    "use-debounce": "^10.0.4",
    "uuid": "^11.0.5",
    "vaul": "^1.1.2",
    "zod": "^3.24.1"
  },
  "overrides": {
    "@types/react": "npm:types-react@rc",
    "@types/react-dom": "npm:types-react-dom@rc"
  },
  "devDependencies": {
    "@types/leaflet": "^1.9.16",
    "drizzle-kit": "^0.20.14",
    "@types/bun": "latest"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  },
  "engines": {
    "node": ">=20.0.0"
  }
}

To reproduce

I really don't know how to reproduce cuz some of my other railway repos are working fine but I got this issue on them in the past also and it auto fixed it someone no idea.

Expected behavior

No response

Environment

Railway Nixpacks

@0xMALVEE 0xMALVEE added the bug Something isn't working label Jan 25, 2025
@0xMALVEE 0xMALVEE changed the title Nixpacks Bug Report Nixpacks Bug Report - bun command not found after deploy to railway Jan 25, 2025
@brody192
Copy link
Contributor

Hello,

Bun is detected and installed when a bun lock file is found, if an npm package-lock.json file is found, bun will not be used.

Please make sure you only have a bun lock file present in your repository.

@0xMALVEE
Copy link
Author

Hello,

Bun is detected and installed when a bun lock file is found, if an npm package-lock.json file is found, bun will not be used.

Please make sure you only have a bun lock file present in your repository.

So I am using pnpm so no package-lock.json but pnpm-lock.yaml
But I still have bun.lockb file , having both will be a issue is it? Should I remove the pnpm-lock.yaml then
Image

@brody192
Copy link
Contributor

That is correct, if anything other than only a bun lock file is found, bun will not be used.

@0xMALVEE
Copy link
Author

That is correct, if anything other than only a bun lock file is found, bun will not be used.

Thanks @brody192 it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants