yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

Module not found: Can't resolve 'flickity' #107

Closed KZTN closed 4 years ago

KZTN commented 4 years ago

I recently start to use this dependency in my projects. When I tried to import to my page using ES2015 it's showing that the module can't be found.

Failed to compile

./node_modules/react-flickity-component/lib/index.js
Module not found: Can't resolve 'flickity' in '/home/kztn/Documents/Portfolio/node_modules/react-flickity-component/lib'

But this file Can be found navigating by the node_modules Screenshot from 2020-06-28 13-30-41

My attempts to solve this problem: Removed ant re-added the dependency Move the project folter to another directory

Flickity version used: ^3.5.0 React version: ^16.13.1 Yarn version: 1.22.4 Node version: 13.12.0 OS: Ubuntu 20.04 LTS

zd4y commented 4 years ago

I am having the same problem on a newly created project using npx create-react-app . and installing it with npm i react-flickity-component. I am using the same version of react and react-flickity-component but npm 6.14.5 and node 14.3.0 on manjaro. I can also find the folder navigating by the node_modules and I am importing it using import Flickity from 'react-flickity-component'

zd4y commented 4 years ago

Hey @KZTN , this is annoying but just use version 3.4.0. It works fine :D

Jebble commented 4 years ago

Duplicate of #96

Install flickity seperate will fix.

martinrojas commented 2 years ago

should the documentation not be updated that flickity should be installed separately now

yaodingyd commented 2 years ago

document updated