Skip to content

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

Open
@rawestmoreland

Description

@rawestmoreland

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

Metadata

Metadata

Assignees

Labels

issue: docs/instructionsIssues about incorrect instructions found on docs.strapi.ioseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: Dev DocsPRs/issues targeting the Developer Docsstatus: confirmedConfirmed by a Strapi Team member or multiple community memberstarget: v4Documentation PRs/issues targeting content from docs.strapi.io (main branch).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions