I ran into this and this had the following cause.
In my package json I have an entry packageManager specifying to use a specific version. In my cli however an older version as active. Hence the difference in the lock file because the different versions were outputting a different format