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

[Bug]: The templates documentation does not reflect what's happening during templates:generate command #914

Open
rawestmoreland opened this issue May 27, 2022 · 2 comments
Assignees
Labels
issue: docs/instructions Issues about incorrect instructions found on docs.strapi.io severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: Dev Docs PRs/issues targeting the Developer Docs status: confirmed Confirmed by a Strapi Team member or multiple community members target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch).

Comments

@rawestmoreland
Copy link

rawestmoreland commented May 27, 2022

Link to the documentation page or resource

https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/installation/templates.html

Describe the bug

There are several discrepancies with the templates documentation and what the templates:generate command is actually doing.

When I run yarn strapi templates:generate blog, the folder structure generated is not what is specified in the list of "allowed" files.

Screen Shot 2022-05-27 at 8 18 21 AM

I end up with:

Screen Shot 2022-05-27 at 8 14 18 AM

Notice admin, src are not listed in the docs as being allowed files.

Also, after pushing to github and running the command

npx create-strapi-app blog001 --template https://github.com/rawestmoreland/strapi-template-blog

I get the error:

Error: ⛔️ Template installation failed: Command failed: npm view https://github.com/rawestmoreland/strapi-template-blog name version --silent

    at createProject (/Users/richard/.config/yarn/global/node_modules/@strapi/generate-new/lib/create-project.js:82:15)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async createQuickStartProject (/Users/richard/.config/yarn/global/node_modules/@strapi/generate-new/lib/create-quickstart-project.js:23:3)

I had attempted the above command with both node 16 and node 14. Both yarn and npx

Additional context

To repro:

  1. Create a strapi project with the strapi/blog template.
  2. Create a template from that with yarn strapi templates:generate blog
  3. Push to repo
  4. Run yarn create strapi-app blog001 --template <github-template-url>
  5. Notice the errors

Suggested improvements or fixes

I think the documentation is perhaps old and pertains to strapi v3.

What is the proper way to create a template and then use that template after pushing to github?

Related issue(s)/PR(s)

No response

@rawestmoreland rawestmoreland added the status: pending reproduction Waiting for free time to reproduce the issue, or more information label May 27, 2022
@derrickmehaffy derrickmehaffy added severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: Dev Docs PRs/issues targeting the Developer Docs status: confirmed Confirmed by a Strapi Team member or multiple community members issue: bug and removed status: pending reproduction Waiting for free time to reproduce the issue, or more information labels May 27, 2022
@derrickmehaffy
Copy link
Member

Talked with the user on Discord and confirmed the docs are quite out of date here. We will need to talk to the expansion squad to update these.

@pwizla
Copy link
Collaborator

pwizla commented Jun 17, 2022

Thank you for opening this issue @rawestmoreland and for opening a PR as well! 🤗
As you know, our devs are also updating the documentation (see PR #665 ). We'll keep you updated :-)

@pwizla pwizla added the target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch). label Jun 17, 2022
@pwizla pwizla self-assigned this Jun 17, 2022
@pwizla pwizla removed the issue: bug label Jun 21, 2022
@pwizla pwizla added the issue: docs/instructions Issues about incorrect instructions found on docs.strapi.io label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: docs/instructions Issues about incorrect instructions found on docs.strapi.io severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: Dev Docs PRs/issues targeting the Developer Docs status: confirmed Confirmed by a Strapi Team member or multiple community members target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch).
Projects
None yet
Development

No branches or pull requests

3 participants