I'm having an issue with integrating the flowbite
package with TailwindCSS in my Next.js application. Despite configuring everything correctly, I am encountering an error when adding the flowbite.min.js
script:
GET http://localhost:3000/node_modules/flowbite/dist/flowbite.min.js net::ERR_ABORTED 404 (Not Found)
I followed Next.js documentation and added the script in my _app.js
file. Here is how it looks:
import Script from 'next/script'
import '~/styles/globals.css'
export default function App({Component, pageProps}) {
return (
<>
<Script src='../node_modules/flowbite/dist/flowbite.min.js' />
<Component {...pageProps} />
</>
)
}
The flowbite documentation suggests adding this script at the end of the body tag:
<script src="../path/to/flowbite/dist/flowbite.min.js"></script>
Even though using a CDN works, I suspect there might be an issue with the path I provided. What should be the correct path for the flowbite.min.js
script?
It's worth noting that in my Next.js setup, I prefer not to utilize flowbite-react
.