[bug]: plugin loaded success but routes/controllers doesn't show up( neither can be used)

Open
#90 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api, backend

Research direction

Start by inspecting the linked reproduction repository, especially src/plugins/buld-uploader, src/plugin.ts, and its package.json. Follow the server API documentation and run strapi routes:list and strapi controllers:list to compare the plugin setup with the generated output. Done means the plugin's routes and controllers appear in both command results and can be used.

Written by the indexing model from the issue text.

Description

issue: bug
What version of @strapi/sdk-plugin are you using?

(base) ➜ strapi-admin git:(master) ✗ pnpm --version
10.10.0
(base) ➜ strapi-admin git:(master) ✗ node --version
v20.10.0

I'm using monorepo environment followed here: create a plugin

What's Wrong?

The plugin shows up in admin panel plugin page. But controllers and routes not show up with cmd: strapi routes:list or strapi controllers:list

To Reproduce
  1. create a new strapi admin project by this cmd: pnpm dlx create-strapi-app@latest
  2. create a new folder => src/plugins/buld-uploader ( I want to call it bulk loader ,but there's a type error, but I think it doesn't make sense to change it , so ~)
  3. add the methods following this page: https://docs.strapi.io/cms/plugins-development/server-api
  4. add package.json file
  5. add plugin config in src/plugin.ts

I created a github public repo here => https://github.com/1057437122/strapi-plugin-bug-maybe.git

Expected Behaviour

controllers and routes show up in cmd: strapi routes:list and strapi controllers:list.

Dominant language
TypeScript
Stars
24
Forks
13
Avg merge
5d 3h
Merged PRs (30d)
5

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from strapi/sdk-plugin

All issues in strapi/sdk-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.