Upgrading Strapi Error: MigrationError: Migration core::5.0.0-discard-drafts (up) failed: Original error: Cannot read properties of undefined (reading 'request')
### Node Version

20.16.0

### NPM/Yarn/PNPM Version

YARN 1.22.19

### Strapi Version

5.8.0

### Operating System

Windows 10

### Database

SQLite

### Javascript or Typescript

Javascript

### Reproduction URL

_No response_

### Bug Description

When upgrading Strapi from 4.25.19 to 5.8.0, an error occurs:


```
MigrationError: Migration core::5.0.0-discard-drafts (up) failed: Original error: Cannot read properties of undefined (reading 'request')                            │
│       at C:\Users\Name\Desktop\project-folder\project-name\node_modules\umzug\lib\umzug.js:169:27 
```

When I duzzled all plugins, all entities and all components - the error went away, but I wouldn't want to create everything again. What should I do?

### Steps to Reproduce

 I followed the official guide on the Strapi documentation site

### Expected Behavior

I was expecting the project to upgrade to version 5+

### Logs

```shell

```

### Code Snippets

_No response_

### Media

_No response_

### Additional information

_No response_

### Confirmation Checklist

- [x] I have checked the existing [issues](https://github.com/strapi/strapi/issues) for duplicates.
- [x] I agree to follow this project's [Code of Conduct](https://github.com/strapi/strapi/blob/develop/CODE_OF_CONDUCT.md).