//Adding @types/react to resolutions in package.json fixed it: "resolutions": { "@types/react": "17.0.43" }