blitz-js / blitz-js/blitz

blitz new app fails on vercel

Open
#4,392 2 comments 0 reactions 0 assignees View on GitHub
kind/bug status/triage
Dominant language
TypeScript
Stars
14.1k
Forks
803
PR merge metrics
No merged PRs in 30d

Description

### What is the problem?

newly created app in blitz fails when deploying to vercel

### Paste all your error logs here:

```
at Object.construct (/vercel/path0/.next/server/chunks/204.js:135:6346)
at 50283 (/vercel/path0/.next/server/app/api/rpc/[[...blitz]]/route.js:1:3357)
at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
at 2677 (/vercel/path0/.next/server/app/api/rpc/[[...blitz]]/route.js:1:3528)
at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
at 94020 (/vercel/path0/.next/server/app/api/rpc/[[...blitz]]/route.js:1:1827)
at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
at r (/vercel/path0/.next/server/app/api/rpc/[[...blitz]]/route.js:1:3842) {
clientVersion: '5.4.2',
errorCode: undefined
}
> Build error occurred
Error: Failed to collect page data for /api/rpc/[[...blitz]]
at /vercel/path0/node_modules/next/dist/build/utils.js:1258:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
Error: Command "npm run build" exited with 1
```

### Paste all relevant code snippets here:

- default/fresh blitz new app

### What are detailed steps to reproduce this?

1. blitz new my-app
2. deploy to vercel
3. inspect deployment

### Run `blitz -v` and paste the output here:

```
Blitz version: 2.1.3 (global)
Blitz version: 2.1.3 (local)
Linux 5.15 | linux-x64 | Node: v20.16.0

Package manager: npm

System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (8) x64 AMD Ryzen 3 3100 4-Core Processor
Memory: 6.68 GB / 7.72 GB
Shell: 3.7.1 - /usr/bin/fish
Binaries:
Node: 20.16.0 - ~/.local/share/nvm/v20.16.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 10.8.1 - ~/.local/share/nvm/v20.16.0/bin/npm
npmPackages:
@blitzjs/auth: 2.1.3 => 2.1.3
@blitzjs/next: 2.1.3 => 2.1.3
@blitzjs/rpc: 2.1.3 => 2.1.3
@prisma/client: 5.4.2 => 5.4.2
blitz: 2.1.3 => 2.1.3
next: 14.1.4 => 14.1.4
prisma: 5.4.2 => 5.4.2
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: ^4.8.4 => 4.9.5
```

### Please include below any other applicable logs and screenshots that show your problem:

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.