yarn.lock is used by yarn tool.
package-lock.json is used by npm tool.
When running yarn install:
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
Above files are not synced, running yarn import after rm yarn.lock; npm install; will generate yarn.lock file that show differences.
also possible to convert them by using synp tool npm install -g synp to convert between the yarn.lock & package-lock.json files:
yarn.lock at: https://github.com/MohGovIL/hamagen-react-native/blob/7d517d5e115a993aa2146d8cbae148992478f181/yarn.lock package-lock.json at: https://github.com/MohGovIL/hamagen-react-native/blob/df4594faeaab24fd22787888101a5201a830689f/package-lock.json
yarn.lock is used by yarn tool. package-lock.json is used by npm tool.
When running
yarn install
:Above files are not synced, running
yarn import
afterrm yarn.lock; npm install;
will generateyarn.lock
file that show differences.also possible to convert them by using synp tool
npm install -g synp
to convert between theyarn.lock
&package-lock.json
files:from
example of differences:
in package.json declared: https://github.com/MohGovIL/hamagen-react-native/blob/40d0de490d47d53d2a005a57270b98a4176745f5/package.json#L81
while in yarn.lock used version 8.0.2 https://github.com/MohGovIL/hamagen-react-native/blob/7d517d5e115a993aa2146d8cbae148992478f181/yarn.lock#L1390-L1393
but in package-lock.json used version 8.0.3: https://github.com/MohGovIL/hamagen-react-native/blob/df4594faeaab24fd22787888101a5201a830689f/package-lock.json#L3091-L3096
There more differences like this (that affect non devDependencies).
fix: Use only 1 file as lock-file, or ensure they are synced (so rebuild that use either of those files will have the same versions installed)