1

[Error: ⛔️ Template installation failed: Command failed: C:\Windows\system32\cmd.exe /q /s /c "npm install @strapi/[email protected] --no-save --silent"] at createProject (c:\Users\Admin\AppData\Local\Yarn\Data\global\node_modules@strapi\generate-new\lib\create-project.js:82:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async createQuickStartProject (c:\Users\Admin\AppData\Local\Yarn\Data\global\node_modules@strapi\generate-new\lib\create-quickstart-project.js:23:3) error Command failed. Exit code: 1 Command: c:\root\yarn\packages\bin\create-strapi-app Arguments: backend --quickstart --template https://github.com/strapi/starters-and-templates Directory: D:\nextjs-strapi-blog Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

1
  • Please provide enough code so others can better understand or reproduce the problem. Commented Jan 17, 2022 at 21:32

1 Answer 1

5

I had same problems, following Strapi's tutorials, but I find out later that Strapi, since v4, changed the way how to create environment from template.

Correct and functional way is use commands shown in readme files in repository https://github.com/strapi/starters-and-templates.

For example for blog template:

# Using Yarn
yarn create strapi-app my-app-name --template blog
# Or using NPM
npx create-strapi-app my-app-name --template blog
Sign up to request clarification or add additional context in comments.

1 Comment

Using npx worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.