admin管理员组

文章数量:1302419

The tailwindCSS ponents 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';`

The tailwindCSS ponents 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?

Share asked May 7, 2022 at 12:38 Kamrul Huda Sattari SaadKamrul Huda Sattari Saad 511 gold badge1 silver badge2 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 6

a work-around would be to add the following minified stylesheet inside the head tag:

<link rel="stylesheet" href="https://unpkg./[email protected]/dist/flowbite.min.css" />

And include the following javascript file before the end of the body element:

<script src="https://unpkg./[email protected]/dist/flowbite.js"></script>

and also removing

import 'flowbite'

for myself this is a temporary fix till the library gets fixed.

本文标签: javascriptWhy my Tailwind components library 39FlowBite39 is not workingStack Overflow