LoginSignup
4
3

More than 5 years have passed since last update.

create-react-appがnpm / yarn の".cache"配下のファイルがないなどでエラーとなる場合の対処法

Posted at

久しぶりにReact触る必要があって、create-react-appしようとしたら、何か失敗しました。

error An unexpected error occurred: "ENOENT: no such file or directory, 
lstat '/home/username/.cache/yarn/v1/npm-external-editor-3.0.3-
5866db29a97826dbe4bf3afd24070ead9ea43a27/main/errors/CreateFileError.js'".

こんな感じのエラーが出てきました。

キャッシュの問題で、キャッシュを削除すれば直ります。

npm cache clean
// yarnの場合は
yarn cache clean

あまりドキュメントもなかったので(エラー文読めば察せるからだろうけど)、一応残しておきます。誰かの参考になれば。

4
3
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
4
3