Update docs/docs/how-to-install-packages.md

Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
This commit is contained in:
Christian 2023-02-24 14:06:24 +01:00 committed by GitHub
parent 9b289f3b31
commit e841c31970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ tags:
# Best practices for installing packages in Strapi
When working with the Strapi mono repo, it's important to follow best practices for installing packages to avoid potential issues and ensure consistent results. Instead of using the standard **`yarn add`** command, we recommend using **`yarn lerna add <package_name> --scope @strapi/<module_name>`** for installing packages.
When working with the Strapi monorepo, it's important to follow best practices for installing packages to avoid potential issues and ensure consistent results. Instead of using the standard **`yarn add`** command, we recommend using **`yarn lerna add <package_name> --scope @strapi/<module_name>`** for installing packages.
This approach uses Lerna, a tool for managing JavaScript projects with multiple packages, to ensure that the package is installed in the correct location and version across all modules. The **`--scope`** flag specifies the specific module that the package should be installed in, ensuring that it's only installed where it's needed.