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?

Git clone直後におきたImportエラーになる件(Cannot find module '' or its corresponding type declarations)

1
Posted at

はじめに

Git Clone直後、Importエラーが起きました。
このエラー解くまでに地味に時間がかかりました。

問題

Git Clone後にインポートエラーになりました。

page
import { ComeBackSearchButton } from "../../components/ComeBackSearchButton";

Cannot find module '../../components/ComeBackSearchButton' or its corresponding type declarations

上記のエラーになっていました。
最初はスペルミスやファイル設置場所が違うかと思い、探していました。
しかし、どこを修正してもエラーはでました。

test@LAPTOP-COLQQNLP:~/workspace/deskset/desksetapp$ find app -maxdepth 4 -type f | sort
app/components/ComeBackSearchButton.tsx
app/search/detail/page.tsx

解決方法

VSCでCtrl + Shift + P→TypeScript: Restart TS Serverを実行すると解決しました。
Git Clone直後とかに起きやすいエラーになりやすいそうです。

おわりに

つぎにいきます。

参考文献

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?