我用纱线做包装经理。我试图安装strapi项目,但始终存在这个错误。
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.发布于 2022-03-01 20:26:31
如果在创建strapi时使用模板,则不需要传递--quickstart标记。
下面是一些使用模板的示例
# 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模板安装
发布于 2022-06-25 06:58:25
您不需要--quickstart标记,根据strapi医生,使用模板创建新项目的命令如下所示:
yarn create strapi-app my-project --template <template-github-name>
在这些示例中,模板-github-name参数可以有不同的形式:
当使用速记时,如果省略用户名,则CLI假设它是strapi。因此,以下命令是等价的:
# 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模板列表
https://stackoverflow.com/questions/70859272
复制相似问题