forcedotcom / SalesforceMobileSDK-Templates

BSD 3-Clause "New" or "Revised" License
52 stars 56 forks source link

React Native Typescript template uses wrong @types/react #306

Closed rpander93 closed 3 years ago

rpander93 commented 3 years ago

package.json uses ^17.0.0 for @types/react while the react dependency is at 16.13.1 which is conflicting.

https://github.com/forcedotcom/SalesforceMobileSDK-Templates/blob/e12a45c428c20235a809e03b5ade4e97bb2c2e84/ReactNativeTypeScriptTemplate/package.json#L31

wmathurin commented 3 years ago

Actually if I try to use @types/react 16.x.x, I get these kinds of errors. I don't get any errors when using 17.

rpander93 commented 3 years ago

Yes, probably because "@types/react-test-renderer": "^17.0.0", has defines an explicit dependency on @types/react@^17.0 so you'll get multiple copies (as is stated as the root cause in the issue you linked).

Run yarn why @types/react to see why it has been installed

wmathurin commented 3 years ago

Fixed with https://github.com/forcedotcom/SalesforceMobileSDK-Templates/pull/309 (will be in our next release).