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?
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?