0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Sanity.io Error: Failed to communicate with the Sanity API の解決法

Posted at

image.png

Error: Failed to communicate with the Sanity API

npm install -g @sanity/cli && sanity init 
を実行すると下記のようなエラーが発生

Error: Failed to communicate with the Sanity API:

このエラーが起きたときの解決法をご紹介します!

CLI errorsこちらの公式ドキュメントからも確認できます。

解決法は簡単:point_up:

ターミナルでsanity logoutsanity login を実行するだけです。
Try to log out and log in again with the sanity logout and sanity login CLI commands.

$ sanity logout //ログアウト

 Logged out

$sanity login //ログイン

 ? Login type (Use arrow keys)
 > Google
   GitHub
   E-mail / password

 Login successful

$sanity init //初期設定

 Looks like you already have a Sanity-account. Sweet!

 ? Select project to use (Use arrow keys)
 > Create new project

改めてログインをすれば、sanity initを実行することができます:tada:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?