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

【Supabase】備忘:急にAccess token not providedがでた話

1
Posted at

はじめに

今回の話は備忘録として残しておきます。
最近個人開発でSupabaseで学習を進めているんですが、
不意な状況でAccess token not providedというエラーが出たので、
一応その解決方法を載せておきます

今回の事件内容

Next.js✖️Supabaseを使用したUdemyコースで学習を進めていました。
テーブルを新たに追加したので、いつも通りプロジェクトの方で
database.types.tsファイルを再作成しようと思って
以下のコマンド

npx supabase gen types typescript --project-id "$PROJECT_REF" 
--schema public > database.types.ts

を実行したら以下のエラーが出てびっくりしたんだよねって話

Access token not provided. 
Supply an access token by running supabase login 
or setting the SUPABASE_ACCESS_TOKEN environment variable.

事件の真相

元々持ち運び用としてWindowsPCを使って結構ガッツリ個人学習してるんですが、
休みの日で出かけない日はMacbookProを中心とした作業環境で個人学習をしています。
最近そのスタイルに変えたのも合って、MacbookProの方で設定を忘れてたっていうだけの話でした笑

npx supabase login

これで問題解決

Need to install the following packages:
supabase@2.72.4
Ok to proceed? (y) y

y押して

Hello from Supabase! Press Enter to open browser and login automatically.

Here is your login link in case browser did not open https://supabase.com/dashboard/cli/login?~~~~~~

Enter your verification code: 

勝手にブラウザで開かれたSupabaseのログイン画面でログインしたら

Token cli_username created successfully.

You are now logged in. Happy coding!
npm notice
npm notice New major version of npm available! 10.7.0 -> 11.7.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.7.0
npm notice To update run: npm install -g npm@11.7.0
npm notice

って感じで解決したって話

あんまりない状況だけど、一応残しておきまする
誰かの解決になればいいなと思いまする

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