LoginSignup
0
0

More than 3 years have passed since last update.

Nuxt.jsのSSR時のVeeValidate2系のエラーについて

Posted at

バージョン

VeeValidate 2系
Nuxt 2系

エラー

VeeValidateを使用しているページにて次のエラーがでる。

Cannot read property 'name' of undefined

原因

nuxt.config.js
  plugins: [
    { src: '~/plugins/vee-validate.js', mode: 'client' },

modeをクライアントにしていると起きるらしい
issueのこちら参照
https://github.com/logaretm/vee-validate/issues/1148#issuecomment-365988770

改善策

nuxt.config.js
  plugins: [
    { src: '~/plugins/vee-validate.js'},

mode: 'client'をやめれば解決。

最後に

veeValidateは3系が出てるっぽいのでバージョンあげたほうが良いかも。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0