我正在使用盖茨比(5.12.3)。我发现它依赖于“@typescript-eslint/eslint-plugin”:“^5.60.1”和“eslint-config-react-app”:“^6.0.0”,
“eslint-config-react-app”依赖于“@typescript-eslint/eslint-plugin”:“^4.0.0”
最新的“@typescript-eslint/eslint-plugin”是“^6.4.1”
所以我得到了“冲突的同伴依赖”。仅当我使用
--legacy-peer-dep
时才有效
gatsby (5.12.3)
--- "@typescript-eslint/eslint-plugin": "^5.60.1",
--- "eslint-config-react-app": "^6.0.0",
--- "@typescript-eslint/eslint-plugin": "^4.0.0",
尝试这组依赖项:
"dependencies": {
"@babel/core": "^7.12.3",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^4.0.0",
"babel-eslint": "^10.0.0",
"eslint": "^7.0.0",
"gatsby": "5.12.3",
"lodash": "4.17.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.3.3",
"webpack": "^5.0.0"
}
您可能会收到有关
react-server-dom-webpack
的警告,但我相信这是良性的。