System Information
- **Strapi Version4.24.2:
- **Operating SystemMacos sonoma version 14.5:
- **Databasepostgresql:
- **Node Version20.18.1:
- **NPM Version8.19.4:
I created a custom plugin and want to send a request from the plugin’s admin panel to its server-side code. Despite following various tutorials and re-checking everything, Strapi doesn’t seem to recognize the plugin server route, and the request never reaches my controller. I consistently get the following error:
{
"data": null,
"error": {
"status": 404,
"name": "NotFoundError",
"message": "Not Found",
"details": {}
}
}
What I’ve Tried
- Deleting the
.cache
folder - Removing
node_modules
and thepackage-lock.json
(both at the project root and inside the plugin) - Creating a new test Strapi project and generating a fresh plugin. The exact same code works there, but not in my main project.
- Using the auto-generated template route and controller (
my-controller
) for the plugin. - Using getFetchClient, useFetchClient and axios the send the request.
- Using the pluginId to reach the correct route.
What I’ve Checked
- Verified that the plugin folder name matches the
package.json
plugin name - Confirmed that the request route is correct by inspecting the network request and Strapi logs
- I have updated the config/plugins file and enabled my plugin.
I would appreciate any help or suggestions on why Strapi doesn’t seem to register my plugin’s server code. Thank you!