-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
'No such validator' when using defineComponent setup syntax #4906
Comments
Same issue |
@readio @LukasGrubis I tried downgrading versions and at some point I got another error (../.../vee-validate does not provide an export named 'Field') in the same component I experienced the 'No such validator' issue. Then I tried to fix that and using this comment: Unable to autoImport components in nuxt and it worked. Then I installed latest vee-validate (4.14.4) and I see no issue with the validators. It's kind of a workaround but it's working at the moment. Im using nuxt 3.13, vue 3.5.12 In order to use vee-validate/rules I created a plugin
In my nuxt.config.ts im not using the veeValidate configurations, and everything is working. |
Spent some time on this, I tagged I'm not sure where to go from here, since vee-validate module looks the same as other modules in the ecosystem. |
Seeing this too, have added a custom plugin as a work around |
I spent even more time on this. My theory is when vite optimizes vee-validate it splits or copies it in two different chunks. Causing some side-effect reliant logic to break which includes:
My last resort here is to make it so that vee-validate's nuxt module excludes vee-validate from the optimization step which seems to solve both issues. The change is here (41d82fd) I tagged |
@logaretm I can confirm the errors are resolved using the latest version (4.14.6). Thanks for looking into this and providing a fix. |
What happened?
We have just updated to the latest @vee-validate/nuxt, version 4.14.3.
We are now getting an error
Uncaught (in promise) Error: No such validator 'required' exists.
After some investigation it appears that this happens when using the defineComponent setup, instead of <script setup>
I have included a link to stackblitz to replicate this.
Reproduction steps
No response
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/nuxt-starter-kgmsew?file=pages%2Findex.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: