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

version [3.1.X] is not working with latest vuetify and cli #49

Closed
mohsinamjad opened this issue Mar 31, 2019 · 6 comments
Closed

version [3.1.X] is not working with latest vuetify and cli #49

mohsinamjad opened this issue Mar 31, 2019 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@mohsinamjad
Copy link

mohsinamjad commented Mar 31, 2019

So i've been trying to use this module in latest vuetify setup when I try to use.
It shows me error in console saying that this.$vuetify is undefined in this module.

it's working till version 3.0.0 without some props like preset, preset-label etc but on latest versions it's breaking. here is my console error

Screenshot from 2019-03-31 12-52-07

some module usage snippet
Plugin
`
//VuetifyDatePicker

import VuetifyDaterangePicker from "vuetify-daterange-picker";

Vue.use(VuetifyDaterangePicker)
`

main.js
import "vuetify-daterange-picker/dist/vuetify-daterange-picker.css"

some-component.vue
<v-daterange ..../>

@figurluk
Copy link

figurluk commented Apr 2, 2019

i have same issue

@praveenpuglia
Copy link
Owner

On initial inspection it doesn't look like a bug in the component at all.
Read more - yariksav/vuetify-confirm#9

It looks like something has changed about how vuetify gets installed and in vuetify's code and this.$vuetify is undefined.

Can you please put your App.vue, main.js and vuetify plugin installation code?

@praveenpuglia praveenpuglia added the help wanted Extra attention is needed label Apr 7, 2019
@praveenpuglia
Copy link
Owner

I somehow seem to have fixed it in 3.1.6.
It's a weird thing and I am not sure of is right or wrong.

I had to remove vue, vuetify, and date-fns from dependencies and add them to peerDependencies. But then doing yarn added them back to dependencies.

So, I had to do an npm install those three modules and then remove the generated package-lock.json so i would still have them in my node modules but not in dependencies.

Then built and published.

Can you all try the 3.1.6 release and see if that solves?

@praveenpuglia
Copy link
Owner

I moved to devDependencies so I can do dev work and still not get into a localVue vs globalVue conflict.

This should have been very obvious that I need to use devDependences for dev work

Ref -
a55a7c9

@lukaVarga
Copy link

I somehow seem to have fixed it in 3.1.6.
It's a weird thing and I am not sure of is right or wrong.

I had to remove vue, vuetify, and date-fns from dependencies and add them to peerDependencies. But then doing yarn added them back to dependencies.

So, I had to do an npm install those three modules and then remove the generated package-lock.json so i would still have them in my node modules but not in dependencies.

Then built and published.

Can you all try the 3.1.6 release and see if that solves?

@praveenpuglia the date-fns seem to be a dependency, though, as adding the vuetify-daterange-picker@3 now breaks build:

This dependency was not found:   
* date-fns in ./node_modules/vuetify-daterange-picker/dist/vuetify-daterange-picker.common.js 
                                                                                                                 
To install it, you can run: npm install --save date-fns 

@praveenpuglia
Copy link
Owner

That is correct. It is because I expect the application developer to install that library. And that is because I want one single version of date-fns being used in case the author also wants to use date-fns for other parts of the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants