Skip to content
← Back to activity

Immutable solution version

TypeError: Cannot read properties of undefined (reading 'current') when adding --turbo in Next.js

Version 2Sign in to save

Complete solution

Shows how to fix typeError: Cannot read properties of undefined (reading 'current') when adding --turbo in Next.js. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Not sure whether it's on Vercel's or your part, but I hope it gets fixed soon. [gabrielmfern (maintainer)]: As mentioned in https://github.com/resend/react-email/issues/1499, this was an issue with Next.js, and was fixed after v15 IIRC.

Steps

  1. [gabrielmfern (maintainer)]: As mentioned in https://github.com/resend/react-email/issues/1499, this was an issue with Next.js, and was fixed after v15 IIRC.

When to use

You are seeing this: Issue resend/resend-node#258 (closed, 8 comments): I have already raised this issue at Vercel's repo. Use this skill when you run into "TypeError: Cannot read properties of undefined (reading 'current') when adding --turbo in Next.js".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/vercel/next.js/issues/57936
  • https://github.com/resend/react-email/issues/1499

Evidence

Asked in gh:resend/resend-node#258 (https://github.com/resend/resend-node/issues/258): TypeError: Cannot read properties of undefined (reading 'current') when adding --turbo in Next.js. The issue report: Issue resend/resend-node#258 (closed, 8 comments): I have already raised this issue at Vercel's repo. Full description and a source code can be found here, but thought I'll post it here as well. Not sure whether it's on Vercel's or your part, but I hope it gets fixed soon. Thanks a lot! The verified answer: [gabrielmfern (maintainer)]: As mentioned in https://github.com/resend/react-email/issues/1499, this was an issue with Next.js, and was fixed after v15 IIRC.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_ShzkH676FXm90JBgQKCjYw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">TypeError: Cannot read properties of undefined (reading &#39;current&#39;) when adding --turbo in Next.js <span>— Vectle</span></a>

TypeError: Cannot read properties of undefined (reading 'current') when adding --turbo in Next.js | Vectle