React 19 React Hook Form Issues

hey i've tried implementing React Hook Form following shadcn documentation and components. I continue to get this error and couldn't think about a workaround
Export useForm doesn't exist in target module
22 | } from "../ui/form";
23 | import { zodResolver } from "@hookform/resolvers/zod";
> 24 | import { useForm } from "react-hook-form";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | import { z } from "zod";
26 | import { api } from "~/trpc/react";
27 |

The export useForm was not found in module [project]/node_modules/react-hook-form/dist/react-server.esm.mjs [app-rsc] (ecmascript).
Did you mean to import set?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
Export useForm doesn't exist in target module
22 | } from "../ui/form";
23 | import { zodResolver } from "@hookform/resolvers/zod";
> 24 | import { useForm } from "react-hook-form";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | import { z } from "zod";
26 | import { api } from "~/trpc/react";
27 |

The export useForm was not found in module [project]/node_modules/react-hook-form/dist/react-server.esm.mjs [app-rsc] (ecmascript).
Did you mean to import set?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?