How can I set up Tailwind elements with NextJs13?

252 Views Asked by At

I've gone through Tailwind Elements set up instructions here https://tailwind-elements.com/docs/standard/getting-started/quick-start/ but can't get it to work with errors: Attempted import error: 'initTE' is not exported from 'tw-elements' (imported as 'initTE').

A little further through my console I also have

- error node_modules/tw-elements/dist/js/tw-elements.umd.min.js (12:3037) @ st
- error ReferenceError: document is not defined

but I'm not sure if this is a cause or a result of the error

Has any one been able to set up Tailwind elements with Next.Js 13?

A few more insights. I've been through the Tailwind Next guide here: https://tailwind-elements.com/docs/standard/integrations/next-integration/

I created a fresh project to test this one out and followed it step by step and this still does not work. I get similar errors such as Attempted import error: 'Datepicker' is not exported from 'tw-elements' (imported as 'Datepicker'). To me it seems that the tw-elements.d.ts file is missing alot of data. It merely contains "declare module "tw-elements"" and nothing more which is strange?

0

There are 0 best solutions below