我有一个使用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”。
实际上,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
以后?