LoginSignup
2
2

More than 5 years have passed since last update.

typedocで 「no such file or directory, stat」 というエラーが出る

Posted at

typedoc でドキュメントを生成しようとすると以下のようなエラーが出るようになってしまった。

❯ yarn docs
yarn docs v0.27.5
$ typedoc --theme default --out docs src

Using TypeScript 2.4.1 from /Users/yoshiki_aoki/work/src/.../node_modules/typescript/libfs.js:954
  binding.stat(pathModule._makeLong(path));
          ^
Error: ENOENT: no such file or directory, stat '/Users/yoshiki_aoki/work/src/.../node_modules/typedoc-default-themes/bin/default/assets'

試しに全部node_module消してキャッシュもクリーンしてインストールし直してみた。

yarn cache clean
yarn

yarnでインストールし直してもダメ。lsで該当ファイルを確認してもない。。。
ふと、npmを使ってインストールしてみた。 npm install したら治った。 🤔

.yarnclean が原因

色々と調べてみるとどうやら、yarn clean を実行して作成された.yarncleanが原因っぽいということがわかった。
確かに中を覗いてみると、assetsという項目がある。これによって、node_modules内のassetsが削除されている模様。

node_modules ディレクトリからもはや要らないファイルを消し、 .yarnclean というファイル(要バージョンコントロール)を吐き出すようです。
http://qiita.com/knjname/items/0cc813622e0121c05723#clean

そして、最新バージョン(1.0.0以降)ではyarn clean からyarn autocleanになっている。

ローカルで使っていたバージョンが v0.27.5 なのでアップグレードした。

2
2
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
2