1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Vercel】supabaseUrl is required. の解決方法

Posted at

はじめに

Vercelでデプロイを行った際に、supabaseUrl is required.というエラーが発生しました。その原因と解決方法についてまとめます。

この記事は個人的なアウトプットを目的として作成したものです。そのため、誤った情報や不足している内容が含まれている可能性があります。もし間違いや気になる点がございましたら、ぜひご指摘いただけますと幸いです

原因

Vercelに環境変数が設定されていなかった ことが原因です。

GitHub Secretsに環境変数を設定していても、Vercelvercel buildでは適用されないため、Vercel側で環境変数を設定する必要があります。

解決方法

Vercelの環境変数を適切に設定することで、エラーを解消できます。

設定方法

  1. Vercelのダッシュボードへ移動
  2. 対象のプロジェクトを開く
  3. SettingsEnvironment Variablesを開く
  4. VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYを追加
  5. 再デプロイ

終わりに

Vercelのデプロイでは、GitHub Secretsだけでは環境変数が適用されないため、Vercel側でも環境変数を設定する必要があることを学びました。今後はデプロイ時の環境変数の扱いに注意していきたいと思います。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?