I get the error: "[coc.nvim] build/index.js not found, please install dependencies and complie coc.nvim by: yarn install"

Viewed 1856

I was wanting to try out a autocompletion tool for python for vim, so I decided to install coc for vim, so I installed by going into my .vimrc file and adding

call plug#begin(~/.vim/plugged')

Plug 'neoclide/coc.nvim', {'branch': 'release'}

Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'}

call plug#end()

but I just get the error

I get the error: "[coc.nvim] build/index.js not found, please install dependencies and complie coc.nvim by: yarn install"

So I tried installing yarn by visiting their website

yarnpkg.com

and I went to the installation page

https://yarnpkg.com/getting-started/install

I followed all the steps correctly, I had the node.js version v17.8.0 and I just get this error:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\jimmy> corepack enable
PS C:\Users\jimmy> npm i -g corepack

added 1 package, and audited 2 packages in 2s

found 0 vulnerabilities
PS C:\Users\jimmy> yarn init -2
yarn : File C:\Program Files\nodejs\yarn.ps1 cannot be loaded. The file C:\Program Files\nodejs\yarn.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn init -2
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

I had no idea what just happened so I went on with the next step

PS C:\Users\jimmy> yarn set version stable
yarn : File C:\Program Files\nodejs\yarn.ps1 cannot be loaded. The file C:\Program 
Files\nodejs\yarn.ps1 is not
digitally signed. You cannot run this script on the current system. For more information 
about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?
LinkID=135170.
At line:1 char:1
+ yarn set version stable
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\jimmy>
1 Answers

I now understand how plugin managers work. At first, I thought it only installs plugins from the directory not thinking that you can download files, so I did it the hard way, the most easy way is to add

Plugin 'neoclide/coc.vim'

and go to vim command and type

PluginInstall

and thats it

Related