maxmarinich / react-alice-carousel

React responsive component for building content galleries, content rotators and any React carousels
MIT License
842 stars 92 forks source link

Circular dependency error #249

Closed zernie closed 2 years ago

zernie commented 2 years ago

When bundling react-alice-carousel using rollup, the following warning is shown:

Circular dependency: node_modules/vanilla-swipe/lib/utils/index.js -> node_modules/vanilla-swipe/lib/utils/calculateDirectionDelta.js -> node_modules/vanilla-swipe/lib/utils/index.js
Circular dependency: node_modules/vanilla-swipe/lib/utils/index.js -> node_modules/vanilla-swipe/lib/utils/calculateDirectionDelta.js -> /Users/zernie/WebstormProjects/prototype-ugc-gallery/extensions/shoppable-src/node_modules/vanilla-swipe/lib/utils/index.js?commonjs-proxy -> node_modules/vanilla-swipe/lib/utils/index.js
Circular dependency: node_modules/vanilla-swipe/lib/utils/index.js -> node_modules/vanilla-swipe/lib/utils/calculatePosition.js -> node_modules/vanilla-swipe/lib/utils/index.js
Circular dependency: node_modules/vanilla-swipe/lib/utils/index.js -> node_modules/vanilla-swipe/lib/utils/resolveDirection.js -> node_modules/vanilla-swipe/lib/utils/index.js
Circular dependency: node_modules/react-alice-carousel/lib/utils/common.js -> node_modules/react-alice-carousel/lib/utils/elements.js -> node_modules/react-alice-carousel/lib/utils/common.js
Circular dependency: node_modules/react-alice-carousel/lib/utils/common.js -> node_modules/react-alice-carousel/lib/utils/elements.js -> /Users/zernie/WebstormProjects/prototype-ugc-gallery/extensions/shoppable-src/node_modules/react-alice-carousel/lib/utils/common.js?commonjs-proxy -> node_modules/react-alice-carousel/lib/utils/common.js

And it is true, because runtime throws the following error: Utils.calculateInitialState is not a function at this line:

https://github.com/maxmarinich/react-alice-carousel/blob/b9af8fa607dda05078f5b639970c5afdc4fda30d/src/lib/react-alice-carousel.tsx#L41

maxmarinich commented 2 years ago

fixed in https://github.com/maxmarinich/vanilla-swipe/pull/29