我遇到了很多漏洞。共有583个漏洞与软件包极简主义有关
我的package.json就是这样:
{
"name": "weather-wizard",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:5000",
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.1",
"@testing-library/user-event": "^7.2.1",
"axios": "^0.19.2",
"chart.js": "^2.9.3",
"eslint-plugin-flowtype": "^3.13.0",
"minimist": "^1.2.5",
"moment": "^2.24.0",
"node-sass": "^4.13.1",
"react": "^16.13.0",
"react-animated-weather": "^4.0.0",
"react-chartjs-2": "^2.9.0",
"react-dom": "^16.13.0",
"react-places-autocomplete": "^7.2.1",
"react-scripts": "3.4.0",
"typescript": "^3.8.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
管理这些漏洞的最佳方法是什么?
答案 0 :(得分:3)
当您看到这样的问题时,您需要首先检查github存储库是否已收到通知,然后创建一个问题以便尽快解决。
他们在以下问题中对此进行了处理:https://github.com/facebook/create-react-app/issues/8672
答案 1 :(得分:0)
解决方案: 对于npm用户:
npm install minimist --save-dev 例如:(最低版本:1.2.5)
将依赖项密钥旁边的解决方案密钥添加到package.json文件中
{
"resolutions": {
"minimist": "^1.2.5"
}
}
将脚本密钥内的以下行添加到package.json中 例如:
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
删除node_modules,然后运行命令:npm install
。
npm audit fix
修复了依赖关系