4
  1. when I try to upgrade the React version , windows rise an error.
  2. the project is react, typescript and firebase for make authentication.
  3. package.json file (dependencies,scripts)
{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "@types/jest": "^26.0.15",
    "@types/node": "^12.0.0",
    "@types/react": "^17.0.0",
    "@types/react-dom": "^17.0.0",
    "@types/react-router-dom": "^5.1.7",
    "firebase": "^8.2.7",
    "form-group": "^3.0.8",
    "react": "^15.3.0",
    "react-dom": "^17.0.1",
    "react-router": "^5.2.0",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.2",
    "react-tinder-card": "^1.3.1",
    "reactstrap": "^8.8.1",
    "typescript": "^4.1.2",
    "web-vitals": "^1.0.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  }
}
Martin Brisiak
  • 3,872
  • 12
  • 37
  • 51

1 Answers1

2

I know it's already been a month but in case you still need it or someone else has the same issue, I got the same error message and was able to solve it with the solution provided on this post.

Apparently it has something to do with the "react" and "react-dom" versions not being the same. And running the following command on the terminal fixes it: npm rm react react-dom && npm i -s react react-dom