Closed devinrhode2 closed 2 years ago
I believe I had deleted all @types packages from package.json before getting this result.
Although, I certainly did still have this package installed inside of my node_modules:
"@types/react": "^16.9.48",
Could this have had an effect?
My best guess is that there is no 16.13
range of the @types/react
package, and since you are using the ~
range specifier, TypeSync can't find a version that matches, and so it picks the latest available as a fallback.
TypeSync uses the satisfies
function from the semver
package for this.
I think best thing people can do in similar situation is to just open up npmjs.com/package/@types/FOO and browse the available versions, and hand-pick a package. That, or just install/update them as you work on your features/fixes
In our package.json, we have dependency:
Running
yarn why
clearly shows we have16.13.1
installed.After running
npx typesync
- I have:But... this is very clearly wrong... Unless there's something special I don't understand about react 16->17 types