-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: Cannot use import statement outside a module #7
Comments
Same issue here |
Same issue in Rails 7. I think it's because package.json needs a "type": "module" statement. I was able to make it work using Flowbite's CDN but it's a bit of a hack, because it's not instantiating Datepicker when I want it to. |
Same issue here. I've tried to manually modify |
Same issue 👍🏻 (node:20352) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. |
Please make @type or resolve this ! |
Any update on this? This is causing some build issues and would love to use the date picker. |
Really would like to see this fixed. Very annoying problem, and sad to see the Flowbite team isn't responding to this problem. |
Unfortunately afaik there are no typescript definitions. You could try to solve your problem by creating a type definition file next to your date picker component. // picker.d.ts
declare module 'flowbite-datepicker/Datepicker'; This wouldn't bring you types but at least it makes the compiler happier |
got same issue in my project |
Hi,
im trying to import the datepicker in nextjs and im getting this error.
SyntaxError: Cannot use import statement outside a module
The text was updated successfully, but these errors were encountered: