Skip to content

Windows only: Strapi 4.25.3: Server crashes when creating a Component #20730

@RndUsername

Description

@RndUsername

Bug report

Required System information

  • Node.js version: v20.15.1
  • NPM version: 10.7.0
  • Strapi version: 4.25.3
  • Database: SQLight
  • Operating system: Windows 11
  • Is your project Javascript or Typescript: JS

Describe the bug

When creating a new component and saving it, the server crashes with:

> strapi develop

⠋ Building build context
[INFO] Including the following ENV variables as part of the JS bundle:
    - ADMIN_PATH
    - STRAPI_ADMIN_BACKEND_URL
    - STRAPI_TELEMETRY_DISABLED
✔ Building build context (90ms)
✔ Creating admin (13337ms)
⠙ Loading Strapi[ERROR]  There seems to be an unexpected error, try again with --debug for more information 

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                                    │
│   TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined                                                 │
│       at Object.join (node:path:433:7)                                                                                                             │
│       at C:\Users\...\strapi-project\node_modules\@strapi\strapi\dist\core\loaders\components.js:17:31                           │
│       at Array.forEach (<anonymous>)                                                                                                               │
│       at C:\Users\...\strapi-project\node_modules\@strapi\strapi\dist\core\loaders\components.js:14:32                           │
│       at Array.reduce (<anonymous>)                                                                                                                │
│       at Object.loadComponents (C:\Users\...\strapi-project\node_modules\@strapi\strapi\dist\core\loaders\components.js:13:27)   │
│       at async Strapi.loadComponents (C:\Users\...\strapi-project\node_modules\@strapi\strapi\dist\Strapi.js:320:23)             │
│       at async Promise.all (index 6)                                                                                                               │
│       at async Strapi.register (C:\Users\...\strapi-project\node_modules\@strapi\strapi\dist\Strapi.js:341:5)                    │
│       at async Strapi.load (C:\Users\...\strapi-project\node_modules\@strapi\strapi\dist\Strapi.js:425:5)                        │
│                                                                                                                                                    │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

(System Paths abbreviated for anonymity)

Steps to reproduce the behavior

  1. Make a new project with npx create-strapi-app@latest my-strapi-project --quickstart.
  2. Go to Content Type Builder and create a new component.
  3. Fill out Display Name and Category.
  4. Select Text Field.
  5. Give the Text Field a name.
  6. Click Finish.
  7. Click Save.
  8. Screen > "Waiting for Restart".
  9. Server crashes.

When trying npm run develop the server crashes immediately with the same error.

Expected behavior

I should be able to create components with out any errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: criticalIf the issue has a security impact or breaks core usage of the productsource: core:content-type-builderSource is core/content-type-builder packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    Status

    Fixed/Shipped

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions