We utilize Lerna for managing our mono-repo projects, and I am seeking the most effective method to install an external package in my projects while ensuring they all use the same version.
Here is my project structure (my-Main-A and my my-Main-B both depend on my-common):
- my-Main-A
- my-common
- my-Main-B
- my-common
Would it be better to install the external package in the common project and export it from there?
import joi from "joi";
export {joi};
Then, importing it into the other projects would look like this:
import {joi} from my-common;
Alternatively, should I install the package in all 3 projects separately?