"node_modules/react-sortable-tree": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/react-sortable-tree/-/react-sortable-tree-2.8.0.tgz",
"integrity": "sha512-gTjwxRNt7z0FC76KeNTnGqx1qUSlV3N78mMPRushBpSUXzZYhiFNsWHUIruyPnaAbw4SA7LgpItV7VieAuwDpw==",
"dev": true,
"dependencies": {
"frontend-collective-react-dnd-scrollzone": "^1.0.2",
"lodash.isequal": "^4.5.0",
"prop-types": "^15.6.1",
"react-dnd": "^11.1.3",
"react-dnd-html5-backend": "^11.1.3",
"react-lifecycles-compat": "^3.0.4",
"react-virtualized": "^9.21.2"
},
"peerDependencies": {
"react": "^16.3.0",
"react-dnd": "^7.3.0",
"react-dom": "^16.3.0"
}
}
dependencies 里面是
"react-dnd": "^11.1.3",
peerDependencies 里面是
"react-dnd": "^7.3.0",
什么原因会导致这种情况呢?
npm install 时,会报错,说^7.3.0 找不到,因为已经有了^11.*.*的版本。这让我只能用 --legacy-peer-deps 来避免这个 react-dnd 包的版本问题。
1
no1xsyzy 2021-05-18 12:58:40 +08:00 1
|
2
pkupyx 2021-05-18 13:00:33 +08:00 1
npm 升级 v7 以后自动 install peer deps,很多老项目懒得更新 peer deps (因为 v4-v6 只有 warning )的就会出这个毛病。
|