flowbite-vue
flowbite-vue copied to clipboard
Nuxt 2 - JS not working
I create a Nuxt 2 project (latest stable version) and I can not make Flowbite works in it. The components are rendering ok but all the JS part does not work. In my case I can not even make a funcional navbar with the given components, the menu button for smartphones do nothing when clicked.
I followed the install steps of flowbite-vue, I also try to use it via CDN and I read this issue from the main repository and others on the web, anything worked for me.
Also have no errors on the chrome console or CMD from VS.
@RafaElZgz I'm shooting in the dark here, since I'm not sure if it's required, but have you included the JS file?
<script src="../path/to/flowbite/dist/flowbite.js"></script>
@RafaElZgz I'm shooting in the dark here, since I'm not sure if it's required, but have you included the JS file?
<script src="../path/to/flowbite/dist/flowbite.js"></script>
Yes, on nuxt.config.js:
head: { script: [ { src: "https://unpkg.com/[email protected]/dist/flowbite.js", body: true, }, ], }
While trying to set up a test case, I couldn't even get flowbite-vue to install, since it requires vue 3 and nuxt 2 uses vue 2. Did you install it only through the CDN? Or did you use npm?
While trying to set up a test case, I couldn't even get flowbite-vue to install, since it requires vue 3 and nuxt 2 uses vue 2. Did you install it only through the CDN? Or did you use npm?
I could without errors in console. Did not even know it requires vue 3. Despite that I tried to install via CDN as showed on my first response and nothing happends, did not work.
Unfortunately, because Vue 3 is the basis for flowbite-vue, I don't think this library will work for a Nuxt 2 or Vue 2 project.
Hey, flowbite-vue will work only with vue 3 and nuxt 3