You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose a feature for doctor that will ideally make life easier for users when upgrading RN versions: detect erroneous top level package.
Essentially inside the app package.json file in the dependencies/devDependencies block, we should inspect for packages which are known to be incompatible (an alternative could be to inspect the yarn.lock).
Packages you should not have in your app package.json are:
A more relaxed way to check for those depedencies is to verify if they're compatible with the RN version (so for instance react-native 0.71.x works only with react-native-codegen version 0.71.x and so on).
In general, there is no reason why a user should directly depend on a package like react-native/@gradle-plugin. What happens is that users find a (generally wrong) workaround somewhere on Github/StackOverflow, and this dependency ends up in their package.json causing future react-native version upgrades to fail badly.
warning users against linking against a specific version of our dependencies in the packages/ folder (excluding react-native)
erroring if the version linked doesn't match minor versions?
I would start with having both as warnigns. But yes you're correct.
If you directly depend on @react-native/codegen, there is probably something wrong with your setup (unless you know what you're doing).
If you depend on a version of @react-native/codegen which is misalinged with the react-native minor version, there is definitely somethign wrong going on (things will blow up).
Still there might be valid scenarios where a user might want to do so, but those are edge cases.
Starting with both warnigns would be the preffered approach for me
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
Activity
blakef commentedon Mar 20, 2023
@cortinico checking my understanding of this here, we should be:
packages/folder (excludingreact-native)Reference:
cortinico commentedon Mar 20, 2023
I would start with having both as warnigns. But yes you're correct.
@react-native/codegen, there is probably something wrong with your setup (unless you know what you're doing).@react-native/codegenwhich is misalinged with thereact-nativeminor version, there is definitely somethign wrong going on (things will blow up).Still there might be valid scenarios where a user might want to do so, but those are edge cases.
Starting with both warnigns would be the preffered approach for me
github-actions commentedon Jun 19, 2023
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
github-actions commentedon Sep 18, 2023
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.