Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong directory with generate:model --plugin #3889

Closed
eddie11n opened this issue Sep 3, 2019 · 3 comments · Fixed by #5547
Closed

Wrong directory with generate:model --plugin #3889

eddie11n opened this issue Sep 3, 2019 · 3 comments · Fixed by #5547
Labels
good first issue Good for newcomers issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:strapi Source is core/strapi package status: confirmed Confirmed by a Strapi Team member or multiple community members

Comments

@eddie11n
Copy link

eddie11n commented Sep 3, 2019

Describe the bug
Run command: strapi generate:model userinfo --plugin foo
You get project/plugins/foo/models/models/userinfo

Expected behavior
Should be project/plugins/foo/models/userinfo

System

  • Node.js version: 11.11.0
  • NPM version: 6.11.1
  • Strapi version: 3.0.0-beta.15
  • Database: Mongo
  • Operating system: macOS
@lauriejim lauriejim added good first issue Good for newcomers severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve status: confirmed Confirmed by a Strapi Team member or multiple community members issue: bug Issue reporting a bug labels Sep 11, 2019
@lauriejim
Copy link
Contributor

lauriejim commented Sep 11, 2019

Hello @eddie11n ! Thank you for reporting this issue.

We already have a PR that fix the same kind of issue.
Please check here 🛠!

You will have to replace the path to the ./extensions folder instead of plugin folder.
To match the extension documentation 📚

Check out the contributing guide to get started: https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md

@soupette
Copy link
Contributor

@lauriejim I have checked with the latest beta (beta.18) and the problem is not happening anymore. I am closing the issue.

@lauriejim
Copy link
Contributor

I reopen this issue. This still happen.
📺here is a record of what I did with a fresh new project beta.18.3

@lauriejim lauriejim reopened this Dec 27, 2019
@lauriejim lauriejim added the source: core:strapi Source is core/strapi package label Feb 11, 2020
alexandrebodin added a commit that referenced this issue Mar 23, 2020
…InPlugin

fix generate:model --plugin path + little refacto of code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:strapi Source is core/strapi package status: confirmed Confirmed by a Strapi Team member or multiple community members
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants