Broken Content-Type Builder. Error: 'The "path" argument must be of type string. Received undefined' when trying to create or edit entity
## Bug report

### Required System information
- Node.js version: **18.20.3**
- NPM version: **10.8.2**
- Strapi version: **5.4.2**
- Database: **postgres**
- Operating system: **macOS Sequoia 15.1.1**
- Is your project Javascript or Typescript: **TypeScript**

### Describe the bug

When you try to create or edit an entity using front-end through content-type-builder it shows "Warning: An error occured". If I try to change schema.json using code editor everything works fine 

### Steps to reproduce the behavior

1. init strapi project
2. create the lifecycles.ts in src/extensions/users-permissions/content-types/user with the content
```
export default {
  async afterCreate(event) {
    strapi.log.info(`User created`);
  },
};
```
3. create the index.ts in src/extensions/users-permissions/content-types with the content
```
import lifecycles from "./lifecycles";
import schema from "./schema.json";

export default {
  schema,
  lifecycles,
};
```
4. create the strapi-server.ts src/extensions/users-permissions/content-types with the content
```
import user from "./content-types/user";

export default (plugin) => {
  plugin.contentTypes.user = user; 
  return plugin;
};
```

### Expected behavior

To have opportunity edit or create entities using frontend of content-type-builder

### Screenshots

![telegram-cloud-photo-size-2-5366164996578468516-y](https://github.com/user-attachments/assets/b6bac83e-0dfd-4827-ab15-da6fb24bc82a)

### Additional context
Error in terminal:
```
[2024-12-03 14:39:51.843] error: The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:1171:7)
    at /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/content-type-builder/dist/server/index.js:734:14
    at Array.map (<anonymous>)
    at createBuilder (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/content-type-builder/dist/server/index.js:728:60)
    at Module.editContentType (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/content-type-builder/dist/server/index.js:951:20)
    at Object.updateContentType (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/content-type-builder/dist/server/index.js:2084:50)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async returnBodyMiddleware (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/services/server/compose-endpoint.js:45:18)
    at async policiesMiddleware (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/services/server/policy.js:15:5)
    at async /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/services/server/compose-endpoint.js:27:12
    at async /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/plugin-sentry/dist/server/index.js:31:7
    at async /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/middlewares/body.js:45:9
    at async /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/middlewares/powered-by.js:9:5
    at async cors (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@koa/cors/index.js:106:16)
    at async /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/middlewares/errors.js:8:7
    at async /Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/middlewares/logger.js:6:5
    at async session (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/koa-session/index.js:41:7)
    at async middleware (/Users/vitaliylosyakov/Documents/Projects/cosmetic-zone/node_modules/@strapi/core/dist/services/metrics/middleware.js:20:5)
```
