The CLI default package manager is not yarn anymore
In Strapi v5, the command used to run dependencies installation is the one used to actually install them.
This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.
| 🔌 Is this breaking change affecting plugins? | No |
|---|
| 🤖 Is this breaking change automatically handled by a codemod? | No |
|---|
Breaking change description
In Strapi v4
All the following commands try to use yarn to install the application dependencies:
npx create-strapi-appnpm create strapi-appyarn create strapi-appyarn dlx …
In Strapi 5
Strapi detects what package manager you are using to run the CLI, and uses this package manager to install dependencies.
Migration
Notes
Since Strapi detects the package manager used to run the command and uses it to install dependencies, this means the following example use cases will happen:
npx create-strapi-appinstalls the dependencies withnpmnpm create …installs the dependencies withnpmyarn create …installs the dependencies withyarnyarn dlx …installs the dependencies withyarnpnpm create …installs the dependencies withpnpmpnpm dlx …installs the dependencies withpnpm
Manual procedure
Users with existing projects are not impacted. Only users doing specific automation and scripts or plugin developers that are used to running a create-strapi-app command and expect yarn to be used by default will be impacted.
If, for instance, you want to use npx but still enforce using yarn to install dependencies, add a --use-yarn flag. Additional information about the possible flags is available in the CLI installation reference.