drewjbartlett / vue-flickity

A Vue Slider / Carousel Component for Flickity.js
http://drewjbartlett.com/demos/vue-flickity/
374 stars 55 forks source link

Not working #3

Closed FrancescoSaverioZuppichini closed 7 years ago

FrancescoSaverioZuppichini commented 7 years ago

I get this error

Uncaught Error: Cannot find module "flickity"
drewjbartlett commented 7 years ago

Did you run npm install vue-flickity --save? You can also try npm install flickity --save if need be.

FrancescoSaverioZuppichini commented 7 years ago

Now it works, but is all bugged

drewjbartlett commented 7 years ago

Can you explain all bugged? I installed this twice yesterday and used it on two different sites with no errors so I'm curious to know what's going on with yours.

ntnelson1s commented 7 years ago

AHHH! Wanted to chime in here. Was stuck on an error forever where I could not resolve module when simply using "import Flickity from 'vue-flickity';". What fixed it was also installing the regular flickity dependency as you stated about.

drewjbartlett commented 7 years ago

That's so strange. It works fine on new projects for me without previously having flickity as a dependency. I just checked the package.json file and saw that vue and flickity are both in a as devDependencies. I wonder if switching them to dependencies will fix it. I'll give it a go as soon as I have a moment

fvmedia commented 7 years ago

+1 I pulled the package, and just as a test, moving the dependancy up to a main dependancy and not dev does fix the issue