Cannot make a custom provider in strapi v5

System Information
  • Strapi Version: 5.9
  • Operating System: Windows 11
  • Node Version: 20.1
  • NPM Version: 10.2

I used to add a custom provider for “upload” in strapi v4 but this method no longer works.
I installed a local package:
“strapi-provider-upload-care”: “file:providers/strapi-provider-upload-care”
The folder includes a package.json and es6 index.ts

The package gets installed properly in node_modules but when I run the project I get this error:

Error: Cannot find module ‘strapi-provider-upload-care’ │
│ Require stack: │
│ - P:\strapi5\node_modules@strapi\upload\dist_chunks\index-D57iKFts.js │
│ - P:\strapi5\node_modules@strapi\upload\dist\server\index.js

Why doesn’t it detect the package?