fannheyward / coc-pyright

Pyright extension for coc.nvim
MIT License
1.28k stars 47 forks source link

[Help] Install coc-pyrgith failed #1099

Closed YuanBLQ closed 2 months ago

YuanBLQ commented 2 months ago

I originally planned to update coc-pyright, but the installation failed. Then I uninstalled the existing old version of coc-pyright and tried reinstalling, but it still install failed. Below is the related log information:

Output of :CoCInstall coc-pyright

Install finished

- ✗ coc-pyright /usr/local/bin/npm install exited with 1

Output of :CoCInfo

## versions

vim version: NVIM v0.10.0
node version: v22.5.1
coc.nvim version: 0.0.82-c5ffbb3c 2024-08-01 17:40:42 +0800
coc.nvim directory: /Users/ixg/.config/nvim/plugs/coc.nvim
term: tmux
platform: darwin

## Log of coc.nvim

2024-08-02T18:07:30.009 INFO (pid:12780) [plugin] - coc.nvim initialized with node: v22.5.1 after 57
2024-08-02T18:07:38.555 INFO (pid:12780) [attach] - receive notification: installExtensions [ 'coc-pyright' ]
2024-08-02T18:07:39.896 INFO (pid:12780) [extension-installer] - Fetched info of coc-pyright {
  'dist.tarball': 'https://registry.npmjs.org/coc-pyright/-/coc-pyright-1.1.371.tgz',
  'engines.coc': '^0.0.80',
  version: '1.1.371',
  name: 'coc-pyright'
}
2024-08-02T18:07:40.509 INFO (pid:12780) [model-download] - Download completed: URL {
  href: 'https://registry.npmjs.org/coc-pyright/-/coc-pyright-1.1.371.tgz',
  origin: 'https://registry.npmjs.org',
  protocol: 'https:',
  username: '',
  password: '',
  host: 'registry.npmjs.org',
  hostname: 'registry.npmjs.org',
  port: '',
  pathname: '/coc-pyright/-/coc-pyright-1.1.371.tgz',
  search: '',
  searchParams: URLSearchParams {},
  hash: ''
}
2024-08-02T18:07:40.513 INFO (pid:12780) [model-download] - Downloaded https://registry.npmjs.org/coc-pyright/-/coc-pyright-1.1.371.tgz => /Users/ixg/.config/coc/extensions/node_modules/coc-pyright-ad1ab075-cdb8-43fc-b791-1ca4e85db604
2024-08-02T18:07:44.283 ERROR (pid:12780) [extensions-index] - Error on install coc-pyright Error: /usr/local/bin/npm install exited with 1
    at ChildProcess.<anonymous> (/Users/ixg/.config/nvim/plugs/coc.nvim/build/index.js:65901:22)
    at ChildProcess.emit (node:events:520:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
2024-08-02T18:07:48.348 INFO (pid:12780) [attach] - receive notification: showInfo []
fannheyward commented 2 months ago

coc.nvim will spawn a child process to run npm install to download package from npmjs.org, this error is came from npm failed to run.

Please make sure your network connection is working, maybe using proxy, and try again.