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?

CodeSandBoxのVSCodeでファイル名を変更したらエラーが出たときの対処法

Posted at

事象

providersディレクトリのUserProvider.jsxをインポートしようとしたところエラーが出たので、確認するとファイル名がuserProvider.jsxになっていたのでファイル名を変更しました。
すると、ファイルが開けなくなったので、削除して再作成しようとすると、下記のメッセージが出て新規作成できない状態になりました。

Unable to create file '/nodebox/src/providers/UserProvider.jsx' that already exists when overwrite flag is not set

解決策

結論から言うと、ログインし直してから新たなファイル名で再作成することで解決しました。
今回は短いコードだったのですぐに打ち直せましたが、タブを閉じる前にファイルの内容をコピーしておくことをおすすめします。
どうやら、CodeSandboxの問題というよりはリモート環境下のVSCodeの問題のようですね……

参考リンク

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?