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

15.2 Canary Breaks Tests - Cannot Read BuildId #1129

Open
columk1 opened this issue Jan 28, 2025 · 1 comment
Open

15.2 Canary Breaks Tests - Cannot Read BuildId #1129

columk1 opened this issue Jan 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@columk1
Copy link

columk1 commented Jan 28, 2025

The problem

Latest canary release breaks tests for API routes. I understand canary is unstable but I'm sharing in case it's helpful. Please close if not relevant.

This is the error:

"TypeError: Cannot read properties of undefined (reading 'buildId') at AppRouteRouteModule.handle"

Reproduction steps

Here's a simple reproduction:
https://stackblitz.com/edit/stackblitz-starters-fzzan9n5?file=package.json

  1. Run npx vitest
  2. See error "TypeError: Cannot read properties of undefined (reading 'buildId') at AppRouteRouteModule.handle"
  3. Revert from next@canary(15.2.0-canary.28) to next 15.1.6 and the test works.
Additional context In my project, I also get an error about console.error being called, which happens even if console.error is mocked.

Error: vitest-fail-on-console > Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using:
vi.spyOn(console, 'error').mockImplementation(() => {})
and test that the warning occurs.

TypeError: Cannot read properties of undefined (reading 'buildId')
at AppRouteRouteModule.handle

@columk1 columk1 added the bug Something isn't working label Jan 28, 2025
@Xunnamius
Copy link
Owner

Thanks for the heads up! I'll take a look at this

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