mirror of
https://github.com/strapi/strapi.git
synced 2025-10-27 08:02:56 +00:00
Add possible error using yarn
This commit is contained in:
parent
3548c7c818
commit
df846baf72
@ -8,7 +8,9 @@ tags:
|
||||
|
||||
# Best practices for installing packages in Strapi
|
||||
|
||||
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.
|
||||
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. Actually, you may encounter the following error using `yarn add`:
|
||||
|
||||
`An unexpected error occurred: "expected workspace package to exist for \"@typescript-eslint/typescript-estree\'`
|
||||
|
||||
This approach uses Lerna, a tool for managing JavaScript projects with multiple packages, to ensure that the package is installed in the correct location(s) and version across all modules that include it. The **`--scope`** flag specifies the specific module(s) that the package should be installed in, ensuring that it's only installed where it's needed.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user