I did not create new custom route but I was calling custom service method from existing find method. (basically modifying existing core controller action)
The only solution i’ve found to this is to create a single-type entity, and add the service there. For some reason a content-types and/or controllers and/or routes folder is required.
Also, writing the service in TS does not work either. Changing the file type from ts → js already results in another error message.
Today I’m using version v4.12.4 (because a bug was fixed that made it impossible to edit the component form) .
And in another project, the v4.11.2 .
In both I use the same code and they work
Your controller/service file inside is “…api/myCollection/services/myCollection.js” or “…api/my-collection/services/my-collection.js” ? Strapi requires filenames in kebab case to work
If the code is not something private (company etc) and you want to share part of your code / repository so I can see how the calls are organized, feel free!