Muqtadir
Muqtadir

Reputation: 69

Installing strapi

I am using yarn as my package manager . I am trying to install strapi project but there is always this error.

C:\Users\Asus\blog-strapi>yarn create strapi-app backend --quickstart --template https://github.com/strapi/strapi-template-blog
yarn create v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
      - create-strapi-app
Creating a quickstart project.
Creating a new Strapi application at C:\Users\Asus\blog-strapi\backend.
Creating files.
Error: ⛔️ Template installation failed: Command failed: C:\WINDOWS\system32\cmd.exe /q /s /c "npm view https://github.com/strapi/strapi-template-blog name version --silent"


    at createProject (C:\Users\Asus\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\Asus\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:\Users\Asus\AppData\Local\Yarn\bin\create-strapi-app
Arguments: backend --quickstart --template https://github.com/strapi/strapi-template-blog
Directory: C:\Users\Asus\blog-strapi
Output:

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

Upvotes: 1

Views: 922

Answers (4)

Manan
Manan

Reputation: 1

If you are experiencing issues with Yarn, you can use npm to install Strapi and create your first project with the following command:

npx create-strapi-app@latest my-project

Before running this command, ensure you choose the appropriate location for your project. For instance, if you want to create your project on drive D:, open your command prompt (CMD) and navigate to the desired directory. Then execute the command:

npx create-strapi-app@latest my-project

Make sure Node.js and npm are already installed on your system.

You can replace "my-project" with any name you prefer for your project.

During the project creation, you might encounter some warnings or vulnerabilities. You can safely ignore these.

Once the project is created, navigate to the Strapi project directory using the cd command. For example:

cd path-to-your-project/my-project

Then start the Strapi development server with:

npm run develop

And you're all set!

Upvotes: 0

SADASHIV MITRA
SADASHIV MITRA

Reputation: 1

Installation steps:

  1. type npx create-strapi-app@latest project-Name --quickstart

In place of "project-Name", you have to mention your own project name

  1. It will install the complete Quickstart modules on its own and will Open the Browser window, where you have to register an account or login

  2. Make sure that you have the correct version of node at the current date the node version requirement is lesser that 18.x.x

To run the Strapi again type npm run develop

In your case you don't need to use --quickstart while installing the same

Upvotes: 0

Rizki Aprita
Rizki Aprita

Reputation: 103

you dont need the --quickstart tag, according to strapi doc, the command to create new project with a template goes like this:

yarn create strapi-app my-project --template <template-github-name>

In these examples, the template-github-name argument can have different forms:

  • A shorthand. If a Github user named paul has a repository called strapi-template-restaurant, then the shorthand would be paul/restaurant. It only works if the repository's name starts with strapi-template-.
  • A URL. Just paste the URL of your GitHub repository. It works even if the repository is not prefixed by strapi-template-.

When using a shorthand, if the username is omitted, the CLI assumes it's strapi. So the following commands are equivalent:

# Shorthand
yarn create strapi-app my-project --template strapi/blog

# Shorthand with username omitted since it defaults to strapi
yarn create strapi-app my-project --template blog

# Full GitHub URL
yarn create strapi-app my-project --template https://github.com/strapi/strapi-template-blog

here is a list of strapi templates that you can use for your project

Upvotes: 0

portatlas
portatlas

Reputation: 687

If you are using a template when you create strapi, you do not need to pass the --quickstart tag

Here are some examples with using the template

# Shorthand
yarn create strapi-app my-project --template strapi/blog

# Shorthand with username omitted since it defaults to strapi
yarn create strapi-app my-project --template blog

# Full GitHub URL
yarn create strapi-app my-project --template https://github.com/strapi/strapi-template-blog

Source: Strapi Doc Template Install

Upvotes: 0

Related Questions