import headlessui/react
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
I am getting this error, I cannot use headlessui ?
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("@headlessui/react")' call instead.
To convert this file to an ECMAScript module, add the field `"type": "module"` to 'xxx/front/package.json'.1 Reply
@Masai Lion I am getting this error, I cannot use headlessui ?
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("@headlessui/react")' call instead.
To convert this file to an ECMAScript module, add the field `"type": "module"` to 'xxx/front/package.json'.
Chilean jack mackerel
have you solved this error?