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?

「モジュール './supabaseClient' の宣言ファイルが見つかりませんでした」エラーが出る

2
Last updated at Posted at 2026-05-10

はじめに

supabaseクライアントの設定の際にエラーが起きたのでまとめます。

問題

React+TypeScript環境で以下記事を参考にsupabaseクライアント設定をしていた際にエラーが起きました。

supabaseClientファイルを呼び出し
import { supabase } from "./supabaseClient";
エラー
モジュール './supabaseClient' の宣言ファイルが見つかりませんでした。'/Applications/github/study-record-app-v3/src/utils/supabaseClient.js' は暗黙的に 'any' 型になります。

解決方法

ファイル名がsupabaseClient.jsとなっていたのをsupabaseClient.tsに修正後、リロードしたら解消しました。

おわりに

Reactだけの開発環境だとjsで問題なかったですが、React+TypeScript環境だとtsじゃないと上手くいきませんでした。TypeScript有無での違いを感じる良い学びになりました。

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?