2
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?

PR: JISOU | Reactプログラミングコーチング
AIで不安を感じたら!    JISOUメンバー募集中

Vercel CLIでデプロイしようとしたら「Error: No existing credentials found.」が出たのでその解決方法

2
Posted at

はじめに

Vercelのプロジェクト作成後、Vercel CLIでデプロイをしようとしたらエラーが発生した。

問題

実行したコマンド

npx vercel --prod

発生したエラー

Vercel CLI 59.11.2 (Node.js 24.14.1)
Error: No existing credentials found. Run `vercel deploy --temporary` to create a temporary deployment you can claim later, or `vercel login` to log in.
Learn More: https://err.sh/vercel/no-credentials-found

解決方法

npx vercel --prod --token <Vercelトークン>

トークンは
Vercelダッシュボード -> 自分のアイコン -> 歯車マーク -> Tokens
から作成してください。

また、ルートに.vercel/project.jsonが存在することが前提です(このファイルはvercel linkやCLIでのプロジェクト作成時に自動生成され、projectId, orgId, projectNameを含みます)。
なお、CI/CDのように非対話環境でこのファイルを用意できない場合は、代わりに環境変数projectId, orgIdを設定することでも同じ効果が得られます。

参考文献

おわりに

私は今回ログインできない状況だったので、トークンを使ってデプロイをしました。
ログインできるならログインをしてからnpx vercel --prodを実行するのがいいと思います。

2
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
2
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?