首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我得到了错误:"[ coc.nvim ] build/index.js未找到,请安装依赖项和复杂的coc.nvim by:纱线安装“

我得到了错误:"[ coc.nvim ] build/index.js未找到,请安装依赖项和复杂的coc.nvim by:纱线安装“
EN

Stack Overflow用户
提问于 2022-04-04 07:31:08
回答 1查看 2.8K关注 0票数 1

我想尝试一个用于vim的python的自动完成工具,所以我决定为vim安装coc,所以我通过进入我的.vimrc文件并添加

代码语言:javascript
复制
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()

但我只是得到了错误

代码语言:javascript
复制
I get the error: "[coc.nvim] build/index.js not found, please install dependencies and complie coc.nvim by: yarn install"

所以我试着通过访问他们的网站来安装纱线

代码语言:javascript
复制
yarnpkg.com

我去了安装页面

代码语言:javascript
复制
https://yarnpkg.com/getting-started/install

我正确地执行了所有步骤,我得到了node.js版本的17.8.0,我只得到了这个错误:

代码语言:javascript
复制
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

我不知道刚才发生了什么,所以我继续下一步

代码语言:javascript
复制
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>
EN

回答 1

Stack Overflow用户

发布于 2022-04-06 00:33:33

我现在明白插件管理器是如何工作的。一开始,我认为它只是从目录中安装插件,而不认为您可以下载文件,所以我用了很难的方法,最简单的方法是添加

代码语言:javascript
复制
Plugin 'neoclide/coc.vim'

然后转到vim命令并键入

代码语言:javascript
复制
PluginInstall

就这样

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71733459

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档