Getting an error -[ERR_INVALID_ARG_TYPE]: The "path" argument

Hi.
I get this issue especially when I am creating a component. I create a component, add a field, and save it, the server restarts and when starting Strapi, it’s throwing this error. When I create a collection type or a single type, it works fine. Only when I create a component, I get this error. Although, it creates the respective files in the src/components directory. When I delete the created component from that directory and restart the server, it starts fine again. Here’s the component’s JSON file:

// src/components/shared/link.json

{
  "collectionName": "components_shared_links",
  "info": {
    "displayName": "Link",
    "icon": "link"
  },
  "options": {},
  "attributes": {
    "href": {
      "type": "string"
    }
  }
}

Yarn version: v1.22.9
Database: mysql
Node version: 18.20.3
NPM version: 10.2.5