vuetify-google-autocomplete icon indicating copy to clipboard operation
vuetify-google-autocomplete copied to clipboard

InvalidValueError: not an instance of HTMLInputElement

Open davidplappert opened this issue 5 years ago • 9 comments

I get the error listed in the title when I generate my site using nuxt (npm run generate) and the field does not show up.

However, when I am developing my site, using npm run dev, everything works as expected, with no errors.

This is a live link using Nuxt: http://the-coffee-hub-com-dev.s3-website-us-east-1.amazonaws.com/

I am using nuxt for my site.

 "dependencies": {
    "@nuxtjs/axios": "^5.9.0",
    "nuxt": "^2.11.0",
    "nuxt-vuex-localstorage": "^1.2.6",
    "vuetify-google-autocomplete": "^2.0.0"
  },
  "devDependencies": {
    "@nuxtjs/vuetify": "^1.0.0"
  }
                <vuetify-google-autocomplete
                  ref="address"
                  id="map"
                  :clearable="true"
                  country="us"
                  placeholder=""
                  :label="'mailing address'"
                  :required="true"
                  :reverse="false"
                  types="address"
                  v-on:placechanged="getAddressData">
                </vuetify-google-autocomplete>
import Vue from 'vue';
import VuetifyGoogleAutocomplete from 'vuetify-google-autocomplete';

Vue.use(VuetifyGoogleAutocomplete, {
  apiKey: '{MY REAL KEY}', // Can also be an object. E.g, for Google Maps Premium API, pass `{ client: <YOUR-CLIENT-ID> }`
  // version: '...', // Optional
  // language: '...', // Optional
});

Screen Shot 2020-01-01 at 2 27 31 PM

Thank you for any help! Happy New Year!

davidplappert avatar Jan 01 '20 20:01 davidplappert

any updates on this

vonec avatar Jan 22 '20 02:01 vonec

still looking for a fix can anyone see whats happening, this is happening on a NUXT app

vonec avatar Jan 29 '20 17:01 vonec

this fails only in production build, dev works perfect

vonec avatar Jan 29 '20 17:01 vonec

I get the error listed in the title when I generate my site using nuxt (npm run generate) and the field does not show up.

However, when I am developing my site, using npm run dev, everything works as expected, with no errors.

This is a live link using Nuxt: http://the-coffee-hub-com-dev.s3-website-us-east-1.amazonaws.com/

I am using nuxt for my site.

 "dependencies": {
    "@nuxtjs/axios": "^5.9.0",
    "nuxt": "^2.11.0",
    "nuxt-vuex-localstorage": "^1.2.6",
    "vuetify-google-autocomplete": "^2.0.0"
  },
  "devDependencies": {
    "@nuxtjs/vuetify": "^1.0.0"
  }
                <vuetify-google-autocomplete
                  ref="address"
                  id="map"
                  :clearable="true"
                  country="us"
                  placeholder=""
                  :label="'mailing address'"
                  :required="true"
                  :reverse="false"
                  types="address"
                  v-on:placechanged="getAddressData">
                </vuetify-google-autocomplete>
import Vue from 'vue';
import VuetifyGoogleAutocomplete from 'vuetify-google-autocomplete';

Vue.use(VuetifyGoogleAutocomplete, {
  apiKey: '{MY REAL KEY}', // Can also be an object. E.g, for Google Maps Premium API, pass `{ client: <YOUR-CLIENT-ID> }`
  // version: '...', // Optional
  // language: '...', // Optional
});

Screen Shot 2020-01-01 at 2 27 31 PM

Thank you for any help! Happy New Year!

just checked your live site, did u fix it ? can you share the fix ?

vonec avatar Jan 29 '20 17:01 vonec

@vonec anyone found a solution to this ? also using nuxt

AndreiD avatar Feb 07 '20 19:02 AndreiD

import Vue from 'vue'

import { VTextField } from 'vuetify/lib' import vuetifyGoogleAutocomplete from 'vuetify-google-autocomplete'

Vue.component('VTextField', VTextField) Vue.use(vuetifyGoogleAutocomplete, { apiKey: 'GOES HERE', })

this happened because the way nuxt import plugins add this import { VTextField } from 'vuetify/lib' to your plugin that fixed it for me

vonec avatar Feb 07 '20 20:02 vonec

Great @vonec you saved my day

monajafinerdit avatar Mar 11 '20 07:03 monajafinerdit

Thanks @vonec. Disabling ssr for the component also works, but then it doesn't render at all with npm generate.

dschreij avatar Mar 12 '20 12:03 dschreij

@vonec thanks so much. you also saved my day.

may I ask how you found the solution? How did you know to use { VTextField } etc. ?

also, do you (or anyone on this thread) know why npm run dev works fine but the issue only shows up in production?

I'm grateful that this solved my problem but I want to understand deeper.

lukkyjoe avatar Mar 30 '20 00:03 lukkyjoe