I have a monorepo with a very basic setup available for reproducing this issue here:
It is a single nestjs app with 2 packages that it reads from.
@nestjs/core among other dependencies is needed for both the packages and the main app to work, and it is enforced to be the exact same fixed version not only on their own local package.json's but also with the resolutions {} config in the main package.json.
I can inspect the lockfile and find out that although the same version is used -- the hashes are different, causing major issues with nestjs, not being able to import injectable dependencies reliably causing it to break on bootstrap.
Is there a way to prevent this? to force linking the exact same hash/dependency?