Skip to main content

v4.14.0 to v4.15.5 migration guide

The present migration guide upgrades Strapi v4.14.0 to v4.15.5. Strapi v4.15.5 updated the loading order of the middlewares, ensuring the logger middleware is loaded first. The migration guide consists of:

  • Upgrading the application dependencies
  • Manually updating the loading order of middlewares in the configuration file
  • Reinitializing the application
Caution

Plugins extension that create custom code or modify existing code, will need to be updated and compared to the changes in the repository. Not updating the plugin extensions could break the application.

Upgrading the application dependencies to 4.15.5

☑️ Prerequisites

Stop the server before starting the upgrade.

  1. Upgrade all of the Strapi packages in package.json to 4.15.5:

    path: package.json
    {
    // ...
    "dependencies": {
    "@strapi/strapi": "4.15.5",
    "@strapi/plugin-users-permissions": "4.15.5",
    "@strapi/plugin-i18n": "4.15.5",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "5.3.4",
    "styled-components": "5.3.3"

    // ...
    }
    }
  2. Save the edited package.json file.

  3. Run the install command:

    Install the upgraded version:

    yarn
    💡 Tip

    If the operation doesn't work, try removing your yarn.lock or package-lock.json. If that doesn't help, remove the node_modules folder as well and try again.

Manually update the loading order of middlewares

Manually update the config/middlewares.js configuration file to ensure that strapi::logger is the first item in the array:

./config/middlewares.js
module.exports = [
"strapi::logger",
"strapi::errors",
"strapi::security",
"strapi::cors",
// …
];

Rebuild the application

Run the following command in your project root directory to rebuild Strapi's admin panel:

yarn build

Restart the application

Run the following command in your project root directory to restart the application:

yarn develop