If you are using workspace concepts, take pnpm as an example, you could use Catalog Protocol to enforce a consistent version
https://pnpm.io/catalogs