首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装strapi

安装strapi
EN

Stack Overflow用户
提问于 2022-01-26 06:17:55
回答 2查看 449关注 0票数 1

我用纱线做包装经理。我试图安装strapi项目,但始终存在这个错误。

代码语言:javascript
复制
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 "create-strapi-app@4.0.5" 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.
EN

回答 2

Stack Overflow用户

发布于 2022-03-01 20:26:31

如果在创建strapi时使用模板,则不需要传递--quickstart标记。

下面是一些使用模板的示例

代码语言:javascript
复制
# 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

来源:Strapi模板安装

票数 0
EN

Stack Overflow用户

发布于 2022-06-25 06:58:25

您不需要--quickstart标记,根据strapi医生,使用模板创建新项目的命令如下所示:

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

在这些示例中,模板-github-name参数可以有不同的形式:

  • 速记。如果一个名为paul的Github用户有一个名为strapi模板餐厅的存储库,那么这个缩写就是paul/strapi。只有当存储库的名称以strapi模板开头时,它才能工作。
  • 一个网址。只需粘贴GitHub存储库的URL即可。即使存储库不以strapi模板作为前缀,它也能工作。

当使用速记时,如果省略用户名,则CLI假设它是strapi。因此,以下命令是等价的:

代码语言:javascript
复制
# 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

下面是一个可以用于项目的strapi模板列表

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70859272

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档