I am posting this on the relevant repositories as I do not know what to do.
I have a project with NextJS that I've started to work on which has a ui
package with tsup
and that contains tailwind based components via shadcn and one of the components is form using react-hook-form
.
react-hook-form
When I use the form component, I get this error, even though I have configured tsup to do "use client"; and also in the component itself I am using "use client";
TypeError: Cannot destructure property 'getFieldState' of '(0 , react_hook_form__WEBPACK_IMPORTED_MODULE_5__.useFormContext)(...)' as it is null.
This might be my configuration error, but I've replicated the configuration from a monorepo with the same setup as me in the NextJS tailwind compiler content to go "../../packages/ui/src/**/*.{ts,tsx}"
.
The way I am testing it is with a button component from the UI package being rendered on the page:
You can see that there is no styling on the button.
Any help would be appreciated, or at least some steps to the right direction. Here is my project
Thank you!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too