【发布时间】:2019-11-06 16:10:41
【问题描述】:
我有一个使用 shadow-cljs 的 ClojureScript 项目。在这个项目中,我使用的是 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”。
而事实上,node_modules/dom-helpers/ 中并没有 transition 目录。但是node_modules/react-swipeable-views/src/SwipeableViews.js中有import transitionInfo from 'dom-helpers/transition/properties';。
它看起来像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?
【问题讨论】:
标签: npm dependencies shadow-cljs react-swipeable-views