YIZHUANG / react-multi-carousel

A lightweight production-ready Carousel that rocks supports multiple items and server-side rendering with no dependency. Bundle size 2kb.
MIT License
1.25k stars 286 forks source link

Can't install #280

Closed dmytro-sokolianskyi closed 2 years ago

dmytro-sokolianskyi commented 2 years ago

Describe the bug After npm install react-multi-carousel --save it doesn't create node_modules/react-multi-carousel/lib directory and import 'react-multi-carousel/lib/styles.css'; throws an error Module not found: Can't resolve 'react-multi-carousel/lib/styles.css'

To Reproduce Steps to reproduce the behavior:

  1. npx create-next-app --use-npm carousel
  2. npm install react-multi-carousel --save
  3. in pages/index.js import Carousel from 'react-multi-carousel'; import 'react-multi-carousel/lib/styles.css';
  4. See an error: Module not found: Can't resolve 'react-multi-carousel/lib/styles.css'
Florian-crg commented 2 years ago

Same problem. As a workaround I use : npm i react-multi-carousel@2.6.3 which works

iuzn commented 2 years ago

You can try using this version: "react-multi-carousel": "2.4.1"

TimNZ commented 2 years ago

This is why I tend to lock dependencies to a specific version and manually update. The 'lib' dir is missing in 2.6.4

OscarBarrett commented 2 years ago

@YIZHUANG FYI

YIZHUANG commented 2 years ago

My bad, should be fixed now if you install the latest version