英文:
Sanity CLI - Studio hostname is already taken
问题
我在Sanity工作室网站的项目管理页面上创建了一个Sanity项目,网址为https://www.sanity.io/manage/personal/projects
,通过项目下拉菜单的选择项目 > 创建新项目:
我还通过CLI在我的项目目录中创建了一个本地的Sanity Studio应用,使用命令$ sanity init
。我的工作室文件夹中的本地sanity.config.js
文件和sanity.io上的项目具有相同的projectId值,但网站上的Sanity工作室显示状态为“未部署”:
当我在终端中输入sanity deploy
以通过CLI部署时,我被提示输入工作室主机名:
Your project has not been assigned a studio hostname.
To deploy your Sanity Studio to our hosted Sanity.Studio service,
you will need one. Please enter the part you want to use.
? Studio hostname (<value>.sanity.studio):
当我输入此项目的现有工作室主机名时,我收到错误消息Studio hostname "<my-hostname-here>" is already taken
Sanity CLI的文档非常有限,缺乏大多数CLI命令的基本文档,包括此情况。我该如何将我的现有本地工作室连接到现有项目?
英文:
I created a Sanity project on the Sanity studio website manage page at https://www.sanity.io/manage/personal/projects
from the project dropdown menu via Select a Project > Create new project:
I also created a local Sanity Studio app in my project's directory via the CLI with $ sanity init
. The local sanity.config.js
file in my studio folder and the project at sanity.io have the same projectId value but the Sanity studio on the website shows status "Not deployed":
When I go to my terminal and type in sanity deloy
to deploy via the CLI, I'm prompted to enter a studio hostname:
Your project has not been assigned a studio hostname.
To deploy your Sanity Studio to our hosted Sanity.Studio service,
you will need one. Please enter the part you want to use.
? Studio hostname (<value>.sanity.studio):
When I type in the existing studio hostname for this project I get the error Studio hostname "<my-hostname-here>" is already taken
Documentation for the Sanity CLI is very sparse and lacks basic documentation for most of the CLI commands, including this case. How can I connect my existing local studio to the existing project?
答案1
得分: 0
以下是要翻译的内容:
一些我尝试过的主机名组合在我的仪表板中并没有显示为活动项目,但却显示为已被占用。
因此,我认为主机名必须是完全独特的子域名,不仅适用于您的项目,还适用于所有 Sanity 项目。
我只是在我想要的主机名末尾添加了我的名字,这被接受并允许我部署。
英文:
A number of combinations for hostnames that I tried and which were not active projects in my dashboard were showing up as taken.
So I assume that the hostname must be a completely unique subdomain, not just for your projects but for all Sanity projects.
I just added my name to the end of the hostname that I wanted and that was accepted and allowed me to deploy.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论