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

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

Open
pjborowiecki opened this issue Nov 2, 2023 · 7 comments

Comments

@pjborowiecki
Copy link

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!

@t6adev
Copy link

t6adev commented Dec 8, 2023

In my case, an error message was TypeError: Cannot read properties of undefined (reading 'create') in Next.js v14.0.1,
server action, no --turbo flag, Resend version is v2.0.0.
Not sure where the problem at. I'm just writing it for a report.

@CarlosZiegler
Copy link

Same problem here:
TypeError: Cannot read properties of undefined (reading 'current') at performWork (/Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/35a94_next_dist_compiled_react-dom_cjs_react-dom-server-legacy_node_development_03cc10.js:9559:57) at /Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/35a94_next_dist_compiled_react-dom_cjs_react-dom-server-legacy_node_development_03cc10.js:9884:28 at scheduleWork (/Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/35a94_next_dist_compiled_react-dom_cjs_react-dom-server-legacy_node_development_03cc10.js:148:13) at startWork (/Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/35a94_next_dist_compiled_react-dom_cjs_react-dom-server-legacy_node_development_03cc10.js:9883:17) at renderToStringImpl (/Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/35a94_next_dist_compiled_react-dom_cjs_react-dom-server-legacy_node_development_03cc10.js:10005:13) at renderToString (/Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/35a94_next_dist_compiled_react-dom_cjs_react-dom-server-legacy_node_development_03cc10.js:10076:20) at /Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/node_modules__pnpm_99c02e._.js:8488:38 at Generator.next (<anonymous>) at fulfilled (/Users/carlosziegler/my_projects/payrolles-web/.next/server/chunks/node_modules__pnpm_99c02e._.js:8416:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@collinversluis
Copy link

+1 I am having the same issue when compiling with turbo

@johanguse
Copy link

johanguse commented May 4, 2024

Same here! I spent a lot of time trying to send emails with react-email until I realized the problem wasn't in my code. Even though the issue on the Vercel repo was closed, I wanted to mention that it's still happening for me.

cc @bukinoshita

@collinversluis
Copy link

Via Krithika in an email to me from resend:

Could you please try adding resend to the serverComponentsExternalPacakge inside your next.config and see if this resolves it? Our team made some updates for this.

IE:
experimental: { serverComponentsExternalPackages: ['resend'] },

image

@johanguse try this and see if it works for you

@johanguse
Copy link

johanguse commented May 6, 2024

Hey, thanks for getting back to me, @collinversluis! I tried adding this to my next config, but it's not working for me. I keep getting an error on 'encodeXML'. I also tried adding or removing the 'transpilePackages: ['html-to-text']' from my next config like I described here, but that didn't work either.

"next": "14.1.4",

The same error occurs with "next": "14.2.3." I prefer to keep the old version for now!

Failed to compile.

./node_modules/.pnpm/html-to-text@9.0.5/node_modules/html-to-text/lib/html-to-text.mjs + 24 modules
Cannot get final name for export 'encodeXML' of ./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/index.js

image

@WoetDev
Copy link

WoetDev commented Jun 9, 2024

Also running into this error that's blocking all my builds with Next.js 14.2.3; wasn't sure if it's resend or react-email so added an issue here: resend/react-email#1499

None of the workarounds are working for me, so I hope we can find a resolution soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants