The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm install should warn about the presence of yarn.lock files
Yarn gives a helpful warning message when a package-lock.json file is found:
yarn install v1.9.4
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.
npm should provide the opposite warning when yarn.lock files are found, suggesting to delete yarn.lock and continue using npm.
I think it’d be great to support yarn.lock format and install versions specified there. yarn.lock and package-lock.json is trying to achieve the same thing anyway.
Yarn lock files finally support integrity fields, so yarn.lock may have enough data to generate package-lock.json automatically now.