我有一个 ClojureScript 项目,使用shadow-cljs. 在这个项目中,我使用的是 NPM 包@material-ui,它工作正常。
现在我想使用react-swipeable-views。因此,我扩展了我的package.json:
"dependencies": {
"@material-ui/core": "^4.5.2",
"@material-ui/icons": "^4.5.1",
"highlight.js": "9.15.10",
"react": "^16.11.0",
"react-dom": "^16.11.0",
"react-flip-move": "3.0.3",
"react-highlight.js": "1.0.7",
"react-swipeable-views": "0.13.3"
}
当我尝试要求时,["react-swipeable-views" :as sv]我从 shadow-cljs 收到此错误:
所需的 JS 依赖项“dom-helpers/transition/properties”不可用,它是“node_modules/react-swipeable-views/lib/SwipeableViews.js”所需的。
而事实上transition,node_modules/dom-helpers/. 但是里面import transitionInfo from 'dom-helpers/transition/properties';有node_modules/react-swipeable-views/src/SwipeableViews.js。
它看起来像一个依赖错误react-swipeable-views,但我是 NPM 的新手。
有什么建议吗?或者如何调试?
更新
它的接缝react-swipeable-views取决于过时的dom-helpers@3.4.0而shadow-cljs使用当前的dom-helpers@5.1.3. 见https://github.com/oliviertassinari/react-swipeable-views/issues/542
可以同时使用吗?还是我必须等到有人修复react-swipeable-views?