-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
nextjs 15: (ecmascript)}.createContext) is not a function #1381
Comments
Hi, I have just encounter the same issue, and it turned out I missed: 'use client'
//... To figure it out I did some experiment and copied some code to my project directly and then got an different error message that I tried to use |
Thanks for your tip. Tried that and it makes no difference. |
The form must be on a client component, in your demo the error goes away if you add Ideally you would do that on the component where the form is. |
Ah ok, thx. But @Balastrong, in my production env i use pages router (i think there is not use client necessary). Should i upload another repro? |
With the pages router I honestly have never tried myself, if you have a repro to share that would help a lot, thanks! |
Describe the bug
I've created a composable api like in this video: https://www.youtube.com/watch?v=YJ3rW85fnKo
But if i want to build my next app i get the following error:
So i tried it with a repro (https://github.com/megacherry/repro-tanstack-form) and get the following error on pnpm dev:
I've probably made a mistake and just don't see it. I have not found a comparable error in the issues.
React Sandbox (working):
https://codesandbox.io/p/sandbox/hopeful-dijkstra-tx94fs
Nextjs Sandbox (failing):
https://codesandbox.io/p/devbox/hjp6lx
Your minimal, reproducible example
https://codesandbox.io/p/devbox/hjp6lx
Steps to reproduce
Expected behavior
no error :)
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows 11 x64
Firefox 136.0.4
TanStack Form adapter
None
TanStack Form version
1.3.0
TypeScript version
5.8.3/5.7.2 in snack
Additional context
No response
The text was updated successfully, but these errors were encountered: