I can't migrate to Strapi 5 | TypeError: strapiServer is not a function
### Node Version

20.18.3

### NPM/Yarn/PNPM Version

Yarn 1.22.22

### Strapi Version

5.10.3

### Operating System

MacOS

### Database

PostgreSQL

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

I'm following the step by step to migrate from Strapi 4 to Strapi 5. I run the command to upgrade to the latest version, various changes are made to the files, etc. After that, when I run yarn develop I get an error ‘TypeError: strapiServer is not a function’.

<img width="1001" alt="Image" src="https://github.com/user-attachments/assets/24fc971e-c4f6-4b94-9f78-dbff6ad36254" />

### Steps to Reproduce

1. npx @strapi/upgrade major
2. yarn develop

### Expected Behavior

The project should be executed after the upgrade and follow the step-by-step instructions.

### 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).