Skip to content
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

Not support Nuxt 3 #820

Closed
dungonfq opened this issue Jan 19, 2022 · 10 comments
Closed

Not support Nuxt 3 #820

dungonfq opened this issue Jan 19, 2022 · 10 comments
Labels

Comments

@dungonfq
Copy link

dungonfq commented Jan 19, 2022

Hi,

I acted upon ur introduction to install floating-vue into Nuxt 3: https://v-tooltip.netlify.app/guide/installation.html#nuxt-3

  1. But when run 'nuxi dev', it fired the error:

Screen Shot 2022-01-19 at 5 12 47 PM

  1. If I run 'nuxi build' then 'nuxi start', the error was shown:

Screen Shot 2022-01-19 at 5 14 20 PM

Please help to take a look. Thank u

@dungonfq dungonfq changed the title Not supported Nuxt 3 Not support Nuxt 3 Jan 19, 2022
@serhez
Copy link

serhez commented Jan 21, 2022

Getting the same errors.

@mgnrfk
Copy link

mgnrfk commented Feb 3, 2022

Same here!

@antfu
Copy link
Collaborator

antfu commented Feb 7, 2022

It looks like floating-vue/nuxt module is missing in the dist. Before it been shipped, the workaround is to create plugins/floating-vue.ts with following content:

import { defineNuxtPlugin } from '#app'
import FloatingVue from 'floating-vue'
import 'floating-vue/dist/style.css'

export default defineNuxtPlugin(({ vueApp }) => {
  vueApp.use(FloatingVue)
})

@Akryum Akryum added the bug label Feb 10, 2022
@Akryum Akryum closed this as completed in f6397ea Mar 11, 2022
@andyjamesn
Copy link

andyjamesn commented Mar 11, 2022

I am unable to get this to work in Nuxt3. Following the documentation for Nuxt3

https://floating-vue.starpad.dev/guide/installation.html#nuxt-3

Just added 'floating-vue/nuxt', to buildModules

I do not get any errors but also when I add v-tooltip="text" it is not rendering any tooltips.

Is there any other setup required to use it as a directive?

@Akryum
Copy link
Owner

Akryum commented Mar 11, 2022

I just tried with the latest version and I have no issue

@andyjamesn
Copy link

andyjamesn commented Mar 11, 2022

As per the docs, I installed using

npm i -S floating-vue

package.json shows this is the version installed

"floating-vue": "^2.0.0-beta.7"

Nuxt is

"nuxt3": "latest"

Is there any additional setup required like importing the css? or is it just adding 'floating-vue/nuxt' to nuxtConfig?

@Akryum
Copy link
Owner

Akryum commented Mar 11, 2022

Yes

@andyjamesn
Copy link

Thanks for your help. I cleared node_modules and ran npm install and it is working now

@sewalsh
Copy link

sewalsh commented May 9, 2022

The nuxt.mjs file is missing from the published NPM package (check your node_modules/floating-vue dir) which is causing the error when you add it to the buildModules array. buildModules: ['floating-vue/nuxt' ]

If you manually add the nuxt.mjs file, it works.

Perhaps this package build pipeline is filtering out the nuxt.mjs file?

@jonatandorozco
Copy link

jonatandorozco commented Sep 10, 2022

You have to add it to modules instead of buildModules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants