fix: correctly resolve the installed package version #538
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
In our project, the
![image](https://private-user-images.githubusercontent.com/21986828/377057956-77197e6a-bb1c-469a-a5f6-472eabd9735a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzQxNTYsIm5iZiI6MTczODgzMzg1NiwicGF0aCI6Ii8yMTk4NjgyOC8zNzcwNTc5NTYtNzcxOTdlNmEtYmIxYy00NjlhLWE1ZjYtNDcyZWFiZDk3MzVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA5MjQxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlMmI0MTJhNDg3ODI2MmVlYjkyZGU3ZTgxMWQwM2IzMTcyOWEzMGI3MDQ0NDZlZmZmYjEwOThhMjhlNWVhYTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.aJgM_nqQnI7rvZ0Kd9d1p3dL9C193d_myMssvIVSb9c)
react-native-web
lib is referenced at two places and the respective version scheme for it is different, one is the^0.19.12
, another is the~0.19.12
, after installing by theyarn
command, the finalyarn.lock
file includes such a fragment which describes what version of thereact-native-web
we're using, but thepatch-package
seems to be not able to correctly process this kind of structure, finally it resolves the package version to be the^0.19.12, react-native-web@npm:~0.19.12
, apparently, it's incorrect and causes the patch procedure to fail.Environment