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

Unable to autoImport components in nuxt #4862

Open
5 tasks done
genu opened this issue Sep 16, 2024 · 10 comments
Open
5 tasks done

Unable to autoImport components in nuxt #4862

genu opened this issue Sep 16, 2024 · 10 comments

Comments

@genu
Copy link

genu commented Sep 16, 2024

What happened?

When integrating with nuxt, setting autoImport: true doesn't seem to work correctly.

An error is thrown:

The requested module '/_nuxt/node_modules/.pnpm/[email protected][email protected]/node_modules/vee-validate/dist/vee-validate.js?v=b2471b49' does not provide an export named 'Form' 

Reproduction steps

  1. Add nuxt module
  2. Try to use <Form>

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

The requested module '/_nuxt/node_modules/.pnpm/[email protected][email protected]/node_modules/vee-validate/dist/vee-validate.js?v=b2471b49' does not provide an export named 'Form'

Demo link

https://stackblitz.com/edit/github-kdegep

Code of Conduct

@ttonyh
Copy link

ttonyh commented Sep 16, 2024

I'm getting the same error in Nuxt v3.13.2 but NOT in v3.13.1
https://github.com/nuxt/nuxt/releases/tag/v3.13.2

There were multiple changes importing, but I'm not sure which change caused this.

@ttonyh
Copy link

ttonyh commented Sep 16, 2024

Referenced here:
nuxt/nuxt#29024

@joaolisboa
Copy link

Can confirm I have this issue in the latest nuxt version

@Ismaele-silla
Copy link

Having the same issue as well

@jakubm95
Copy link

The same error, works with nuxt 3.12.4 bug in 3.13.2

@rrubio
Copy link

rrubio commented Sep 23, 2024

Same here. What version of vee-validate should I use with nuxt 3.12.4?

@9M6
Copy link

9M6 commented Sep 24, 2024

@rrubio seems only up to that version works.

@luc122c
Copy link

luc122c commented Sep 24, 2024

I'm also having a similar issue (The requested module '[...]vee-validate.js' does not provide an export named 'Field'). Pinning Nuxt to 3.12.4 seems to be a good workaround for now.

@genu
Copy link
Author

genu commented Sep 24, 2024

You don't have to downgrade nuxt to workaround this issue. You can simply import the component manually from vee-validate

@luc122c
Copy link

luc122c commented Sep 25, 2024

You don't have to downgrade nuxt to workaround this issue.

I know, but I have a lot of components importing Field, I don't fancy adding manual imports to them all. It's easier for me to pin Nuxt until the auto-import issue is resolved.

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

No branches or pull requests

8 participants