我尝试从 NPM 7 的对等依赖检查中排除react-virtualized包。我知道我可以单独安装该包
npm install react-virtualized --legacy-peer-deps
...但我的目标是使用 npm install 安装所有软件包,并且不应检查对等依赖项。那可能吗?
我会接受任何向我展示如何操作 package.json 的答案,以便新的npm install运行而不会出现对等依赖错误。我有以下 package.json:
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-beautiful-dnd": "^13.1.0",
"react-device-detect": "^1.11.14",
"react-markdown": "^7.0.0",
"react-resize-detector": "^6.7.1",
"react-virtualized": "^9.22.3"
}
}