Course lesson

Install Dependencies for Specific Packages in a Monorepo

We can install a dependency inside a monorepo by running npm install, then the name of the dependency, in our case, it’s going to be Lodash. But, we are going to add different flags to that.

Duration
2 min
Access
Included
Transcript
Retained from source evidence

We can install a dependency inside a monorepo by running npm install, then the name of the dependency, in our case, it’s going to be Lodash. But, we are going to add different flags to that.

If we use the -w flag, we would have to specify in what package we want to install Lodash. We will do this for monorepo/utils. We could also use the -ws flag to install Lodash across all the packages in the monorepo. We can also use -W in uppercase to install Lodash in the root of the project.