Reputation: 51
The tailwindCSS components library 'Flowbite" is not working after react has been upgraded to version18. I am following all the steps described in the documentation of 'Flowbite'. On the 6th step when I am importing the 'Flowbite' plugin in my tailwind.config.js
file, I am getting this
Could not find a declaration file for module 'flowbite/plugin'. 'D:/Web Development/Random Tests/Practice day task/test-app/node_modules/flowbite/plugin.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/flowbite` if it exists or add a new declaration (.d.ts) file containing `declare module 'flowbite/plugin';`
What are the reasons and how to solve this?
Upvotes: 5
Views: 14910
Reputation: 1012
a work-around would be to add the following minified stylesheet inside the head tag:
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/flowbite.min.css" />
And include the following javascript file before the end of the body element:
<script src="https://unpkg.com/[email protected]/dist/flowbite.js"></script>
and also removing
import 'flowbite'
for myself this is a temporary fix till the library gets fixed.
Upvotes: 6