In my case, I am trying to use coc-clangd
at work where we have a firewall, preventing access to external resources (like github). There is however a way to have a local mirror of github repos. This is where i have copies of coc.nvim
and clangd/coc-clangd
:
Installing this extension, however, doesn't work out of the box:
First method: :CocInstall http://companymirror/github/clangd/coc-clangd.git
results ... in is not supported, coc.nvim support github.com only
Second method: Plug 'clangd/coc-clangd', {'do': 'yarn install --frozen-lockfile'}
(in .vimrc
with vim-plug
)
results in an error on :PlugInstall
:
warning package.json: License should be a valid SPDX license expression
warning coc-clangd@0.4.10: License should be a valid SPDX license expression
[1/5] Validating package.json...
warning coc-clangd@0.4.10: License should be a valid SPDX license expression
warning coc-clangd@0.4.10: The engine "coc" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz: self signed certificate in certificate chain".
info If you think this is a bug, please open a bug report with the information provided in "/home/user/.vim/plugged/coc-clangd/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
where /home/user/.vim/plugged/coc-clangd/yarn-error.log
has:
Arguments:
/usr/local/node-v12.18.0-linux-x64/bin/node /usr/share/yarn/bin/yarn.js install --frozen-lockfile
PATH:
/usr/local/node-v12.18.0-linux-x64/bin:/software/centos7/binutils/2.30/bin:/software/centos7/ccache/3.2.2/bin:/software/centos7/cmake/3.13.2/bin:/software/centos7/gdb/8.1/bin:/software/centos7/gcc/8.2.0/bin:/home/user/bin/fzf/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/user/.fzf/bin:/usr/lib/llvm10/10.0.0/bin/:/home/user/.local/bin:/home/user/bin/fzf-0.17.5/:/home/user/bin
Yarn version:
1.22.4
Node version:
12.18.0
Platform:
linux x64
Trace:
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1506:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:948:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)
System information:
Clangd version: 10.0.0
Operating system: CentOS 7.3
EDIT:
There is no proxy server available, that could allow to make use of http_proxy
like env variables.
EDIT 2: This appeared to be an issue with yarn
configuration. this question gave a hint to run yarn config set "strict-ssl" false -g
, which turned off certificate checking and let me install the extension!