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

SpeedInsights import causes breaking changes on pages router #72

Closed
ingridkindem opened this issue Jun 11, 2024 · 3 comments
Closed

SpeedInsights import causes breaking changes on pages router #72

ingridkindem opened this issue Jun 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ingridkindem
Copy link

Nextjs with pages router.

Versions to reproduce:

    "@vercel/speed-insights": "^1.0.11",
    "next": "14.2.3",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",

When I add the <SpeedInsights /> to _app.tsx, the app breaks. When trying to build the project, I get Generating static pages (0/2) [ ]TypeError: Cannot read properties of null (reading 'entries').

Related issues:

I have tried to work around this with different versions, but not being able to find anything that works. Have deleted my .next folder and rebuilt the project for each install.

Any suggestions for compatible package versions that would make the build pass?

@feugy feugy added the bug Something isn't working label Jun 12, 2024
@feugy feugy self-assigned this Jun 12, 2024
@feugy
Copy link
Member

feugy commented Jun 12, 2024

Hello @ingridkindem .
I couldn't reproduce the issue with a plain Next.js pages application pinned to the version you shared.
However there's only one place where it could fail, so I crafted a fix in @vercel/[email protected].

Would you mind trying it please?

If it does not fix it, I'll need a reproduction code sandbox like this one.

@ingridkindem
Copy link
Author

@feugy Thanks for the quick reply and fix! It fixed the build issue, but unfortunately, I ran into the same issue described here now: #35

@feugy feugy closed this as completed Jun 12, 2024
@feugy
Copy link
Member

feugy commented Jun 12, 2024

@ingridkindem, could you please create a code sandbox for it? I've never managed to reproduce it.

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