I am trying to use pickr package ( a color picker library) in my nuxt.js app , at import time it is providing error called window is undefined here is code: tried approaches i made pickr package as a nuxt plugin added it to nuxt.config.js with mode:client i made pickr package as a nuxt plugin added it to nuxt.config.js with
Tag: nuxt.js
localstorage.getItem() not working in NUXT JS
I am trying to develop a shopping cart with nuxt js. I am successfully storing the cart data in local storage but I am unable to retrieve the data. N.B: i don’t wanna use vuex-persistedstate. Answer I see lots of small problems with this. First of all, it looks like you’ve put addToCart and saveInLocalStorage judging by the fact you
Avoid Mutating Props Directly in a Nuxt VueJs
So I see a lot of posts about this issue but I can’t wrap my head as to why I am doing wrong here. I have a form that I place in a component. It’s mostly made up of TextFields using vuetify. I am then reusing this form somewhere else. I’ve tried different things but I am still getting the
NuxtJs dynamic open graph tags are not working
i am trying to set up a dynamic open graph meta tags using the following code I have logged postDetails and the data is there in asyncData function. Now when i open the page and inspect the meta tags are perfectly changed, but when i open facebook and paste in it or press ctrl + u it only shows its
Cannot read property ‘$options’ of undefined making external js file for head options
I need to set up global head in Nuxt for my app, which some subpages will overwrite. Those global head needs to contain translated data. I created seoHead.js file with code: I import and use this data in my index.vue and other pages like this: Unfortunately, I am facing Cannot read property ‘$options’ of undefined error. It’s strange for me,
Vue.js pass form data (v-model) values from Parent to Child?
I have a two component form using vue.js where the parent form starts the multistep process and collects two inputs using v-model and if these are valid values the form moves to the next component of the form using a child component. What I would like to do is take the parent 2 values and append them to the child
How to make a plugin work on refresh? (Nuxt)
I am trying to use the vue GAPI plugin in a project. It works fine when navigating between pages, but on refresh I get the error: vue-gapi.common.js?15fd:241 Uncaught (in promise) Error: gapi not initialized at GoogleAuthService.isSignedIn (vue-gapi.common.js?15fd:241) I think this is due to the way I am initialising the component in my project – namely through the /plugins folder. I
Go to next input field at maxLength?
I have a form in Vue that has some combined inputs for styling reasons for a phone number input. My problem is that the user has to hit tab in order to go to the next input field of the phone number. Is there a way to check for the max length of the current and input and when that
nuxtjs – setting background-url to image from assets doesn’t work
after lots of research I haven’t found a solution which explains why this is happening. When trying to set the background-image in my div dynamically it doesn’t work and I am getting an 404 error. http://localhost:3000/~assets/images/postPreview.jpg 404 (Not Found) I am passing it like this (thumbnail): ~assets/images/postPreview.jpg and get the above error. If i pass it like this then it
Including Javascript snippet that starts with $ in Nuxt page – returns this.$ is not a function
I’m often having difficulty figuring out how to include Javascript snippets in individual components/pages with Nuxt. In the code below, I am getting $ is undefined: I’ve also tried removed this. – that gives me $ is undefined. Any help is appreciated – thanks Answer You’re trying to use a jQuery syntax request with the $ shortcut function, but jQuery