next-safe-action / adapter-react-hook-form

Seamlessly integrate next-safe-action with react-hook-form.
https://www.npmjs.com/package/@next-safe-action/adapter-react-hook-form
MIT License
37 stars 0 forks source link

Cannot Import useHookFormAction #3

Closed andrwagn closed 2 months ago

andrwagn commented 2 months ago

I get an error when i want to import { useHookFormAction } from "@next-safe-action/adapter-react-hook-form/hooks"; in my turborepo ui package: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@next-safe-action/adapter-react-hook-form/hooks")' call instead. To convert this file to an ECMAScript module, add the field"type": "module"to '/home/aa/Documents/aa/packages/ui/package.json'.ts(1479) I cannot set "type": "module" as this leads to other typescript issues. Is there a workaround for this?

TheEdoRan commented 2 months ago

Can you please set up a repo with a minimal reproduction of the issue and post the link here, so I can take a look at it? Thank you!