LoginSignup
42
13

More than 1 year has passed since last update.

coc.vimで'[coc.nvim] build/index.js not found, please install dependencies and compile coc.nvim by: yarn install'と言われた

Last updated at Posted at 2021-09-16

突然のエラー

[coc.nvim] build/index.js not found, please install dependencies and compile coc.nvim by: yarn install
  • Macをアップデートしたから?
  • deinでプラグインアップデートしたから?

正直どれが原因かわからなかったけど、なんとかエラーでなくした記録が誰かのお役にたてばと(備忘録も兼ねて)

vim8でdeinを使っている

  • deinの機構として、プラグインはgithubからcloneしてるだけです
  • なのでそのディレクトリを見つけて git pull したら最新のがおちてくるから解決するんじゃないかという仮説
cd ~/.cache/debin/repos/github.com/neoclide/coc.nvim
git pull origin master

結果

  • 変わらず
  • ヒントはすでにログに書かれているのにねえ・・・

そのディレクトリでyarn installしてみる(先にこっちやろうぜ)

cd ~/.cache/debin/repos/github.com/neoclide/coc.nvim
yarn install

結果

  • 変わらず
  • まじで?!

うーん、困った

  • 詰んだかと見せかけて・・・
  • 基本に立ち返って、coc.vimのコマンドを打ってみる
: call coc#util#install()

結果

  • なおった!!

結論として

  1. dein側でプラグインアップデート
  2. 上が機能していなさそうであれば、直接git pull
  3. call coc#util#install() 
  4. おそらく上記コマンドだけでよい(yarn installは上記コマンドがやってくれる)
42
13
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
42
13