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

When tried to deploy latest canary to vercel -- Error: Invariant: prefetchDataRoute can't be set without PPR #66110

Closed
patelvivekdev opened this issue May 23, 2024 · 4 comments
Labels
bug Issue was opened via the bug report template. locked Partial Prerendering (PPR) Related to Partial Prerendering.

Comments

@patelvivekdev
Copy link

Link to the code that reproduces this issue

https://github.com/patelvivekdev/latest-canary

To Reproduce

It is working in the localhost build.

When I tried to deploy on Vercel, I got the error.

Current vs. Expected behavior

I used the PPR and React compiler on another project using version next@14.3.0-canary.76, which was deployed successfully.

But when I update the react version and the next version to next@14.3.0-canary.78, I get an error when I try to deploy on Vercel.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 16069
  Available CPU cores: 20
Binaries:
  Node: 20.12.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.3.0-canary.78 // Latest available version is detected (14.3.0-canary.78).
  eslint-config-next: 14.3.0-canary.78
  react: 19.0.0-rc-f994737d14-20240522
  react-dom: 19.0.0-rc-f994737d14-20240522
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Partial Prerendering (PPR)

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

When I tried to deploy my demo application, which uses PPR with the react compiler from the latest Canary, I got errors.

[02:17:47.813] Running build in Washington, D.C., USA (East) – iad1
[02:17:49.340] Cloning github.com/patelvivekdev/latest-canary (Branch: master, Commit: 5af0fbd)
[02:17:50.090] Previous build cache not available
[02:17:50.304] Cloning completed: 961.05ms
[02:17:52.590] Running "vercel build"
[02:17:54.518] Vercel CLI 34.2.0
[02:17:56.729] Installing dependencies...
[02:17:56.860] bun install v1.1.8 (89d25807)
[02:18:03.289] 
[02:18:03.290]  + @types/node@20.12.12
[02:18:03.290]  + @types/react@18.3.2
[02:18:03.290]  + @types/react-dom@18.3.0
[02:18:03.290]  + eslint@8.57.0
[02:18:03.290]  + eslint-config-next@14.3.0-canary.78
[02:18:03.290]  + postcss@8.4.38
[02:18:03.290]  + tailwindcss@3.4.3
[02:18:03.290]  + typescript@5.4.5
[02:18:03.290]  + babel-plugin-react-compiler@0.0.0-experimental-592953e-20240517
[02:18:03.290]  + next@14.3.0-canary.78
[02:18:03.290]  + react@19.0.0-rc-f994737d14-20240522
[02:18:03.290]  + react-dom@19.0.0-rc-f994737d14-20240522
[02:18:03.290] 
[02:18:03.290]  380 packages installed [6.48s]
[02:18:03.343] Detected Next.js version: 14.3.0-canary.78
[02:18:03.354] Running "bun run build"
[02:18:03.366] $ next build
[02:18:04.916] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[02:18:04.917] This information is used to shape Next.js' roadmap and prioritize features.
[02:18:04.917] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[02:18:04.917] https://nextjs.org/telemetry
[02:18:04.918] 
[02:18:05.098]   ▲ Next.js 14.3.0-canary.78
[02:18:05.098]   - Experiments (use with caution):
[02:18:05.098]     · ppr
[02:18:05.098]     · reactCompiler
[02:18:05.098] 
[02:18:05.257]    Creating an optimized production build ...
[02:18:21.660]  ✓ Compiled successfully
[02:18:21.661]    Linting and checking validity of types ...
[02:18:25.679]    Collecting page data ...
[02:18:26.874]    Generating static pages (0/5) ...
[02:18:26.942]    Generating static pages (1/5) 
[02:18:27.174]    Generating static pages (2/5) 
[02:18:27.175]    Generating static pages (3/5) 
[02:18:27.251]  ✓ Generating static pages (5/5)
[02:18:27.383]    Finalizing page optimization ...
[02:18:27.384]    Collecting build traces ...
[02:18:32.790] 
[02:18:32.800] Route (app)                              Size     First Load JS
[02:18:32.800] ┌ ◐ /                                    5.25 kB        94.7 kB
[02:18:32.800] └ ○ /_not-found                          897 B          90.4 kB
[02:18:32.800] + First Load JS shared by all            89.5 kB
[02:18:32.801]   ├ chunks/331-3426649917445e2c.js       35.7 kB
[02:18:32.801]   ├ chunks/f5e865f6-7e2b2023c7476c6d.js  51.9 kB
[02:18:32.801]   └ other shared chunks (total)          1.86 kB
[02:18:32.801] 
[02:18:32.801] 
[02:18:32.801] ○  (Static)             prerendered as static content
[02:18:32.801] ◐  (Partial Prerender)  prerendered as static HTML with dynamic server-streamed content
[02:18:32.801] 
[02:18:32.883] Traced Next.js server files in: 37.423ms
[02:18:34.319] Created all serverless functions in: 1.435s
[02:18:34.322] Error: Invariant: prefetchDataRoute can't be set without PPR
[02:18:34.668] 
@patelvivekdev patelvivekdev added the bug Issue was opened via the bug report template. label May 23, 2024
@github-actions github-actions bot added the Partial Prerendering (PPR) Related to Partial Prerendering. label May 23, 2024
@patelvivekdev patelvivekdev changed the title When tried to deploy canary to vercel -- Error: Invariant: prefetchDataRoute can't be set without PPR When tried to deploy latest canary to vercel -- Error: Invariant: prefetchDataRoute can't be set without PPR May 23, 2024
@sohanemon
Copy link

I have encountered the same issue; however, I was able to successfully deploy it from my terminal. For my production deployment, I utilized the command npx vercel --prod.

@ztanner
Copy link
Member

ztanner commented May 23, 2024

Hi -- thanks for the report! This was resolved, and I was able to successfully deploy your reproduction on the latest Next.js RC. But please let us know if you're still running into issues.

@ztanner ztanner closed this as completed May 23, 2024
@patelvivekdev
Copy link
Author

Now it is deployed.

Thanks team.

On the way to try Next15 RC 😍.

Copy link
Contributor

github-actions bot commented Jun 7, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot added the locked label Jun 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked Partial Prerendering (PPR) Related to Partial Prerendering.
Projects
None yet
Development

No branches or pull requests

3 participants