I was trying to start a project with 'npx create-react-app'.
However,
@types/eslint v8.4.4 missing from NPM registry same Error
so i tried 'npx create-react-app@5.0.1 test --template typescript --ignore-existing'
I solved the problem with that command, but another problem occurred
I typed the npm start command in vscode and an error as shown in the picture occurred. error
So I put the following code in package.json.
{
"name": "test",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.11.42",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"gh-pages": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-query": "^3.39.1",
"react-router-dom": "^5.3.0",
"react-scripts": "5.0.1",
"recoil": "^0.7.4",
"styled-components": "^5.3.5",
"typescript": "^4.7.4",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/eslint": "^8.4.3",
"@types/react-helmet": "^6.1.5",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.25"
},
"overrides": {
"@types/eslint": "8.4.3"
}
}
And Installed
- npm i @types/eslint@8.4.3
- npm i -D @types/eslint@8.4.3
But I keep getting an error like the picture...
npm v8.5.5 node v16.15.0