After updating everything to the latest I get the following issue while compiling my code
TypeScript @ 2.4.2
react @ 15.6.1,
types/react @ 16.0.4
Please note that it complains even though the interfaces are identical to the letter.
Downgrading to 16.0.1 works.
Same issue with @types/[email protected].
rm yarn.lock && yarn
Removing the lock file fixed the issue. Probably a mismatch somewhere rather than an error.
For anyone else's reference, I was banging my head on this issue for a while and my issue was that I was using CRA to bootstrap a nested project (i.e. in an examples folder) and the TS module resolution was finding react
both in the new project's node_modules
and the parent project's node_modules
I just added skipLibCheck: true
on tsconfig.json
and worked like a charm.
Most helpful comment
Removing the lock file fixed the issue. Probably a mismatch somewhere rather than an error.