T
T
Timofey2022-04-18 20:49:45
typescript
Timofey, 2022-04-18 20:49:45

Errors ts2605, how to start a project?

I have a problem. The project does not start, if you run it through npm run start, everything is OK, everything is clickable for the first couple of seconds, and then everything is not clickable and typing errors appear in the browser console by type:.

JSX element type 'Provider<AnyAction | LocationChangeAction<PoorMansUnknown>>' is not a constructor function for JSX elements.
 The types returned by 'render()' are incompatible between these types.
 Type 'ReactNode' is not assignable to type 'Element | null'.
 Type 'undefined' is not assignable to type 'Element | null'.  TS2605

If you collect then they climb, errors are also typing. I tried to explicitly set the version of "@types/react": "^16.9.43" in the dependencies "peerDependencies"), replaced all matches in the package-lock file with "@types/react": "*" with "@types/" react": "^16.9.43". This did not help me, as well as updating the global typescript to the version in the project. I tried to install versions of npm and node on the one that is on another PC and where everything works. Typescript version in the project: "typescript": "^3.7.5", react version: "react": "^16.13.1. Many people had a similar error and was solved by adding the line "allowSyntheticDefaultImports": true to tsconfig. I have it is present.Where can I dig to start?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question