Extension doesn't work
mikev9 opened this issue · 3 comments
What's the output of :CocCommand pyright.version
Error on notification "runCommand": Command: pyright.version not found
What's the output of :CocCommand workspace.showOutput Pyright
Nothing
The extension doesn't work. For example, go-to-definition isn't working:
Error on notification "jumpDefinition": definition provider not found for current buffer, your language server doesn't support it.
Additional Context
:CocList extensions
+ coc-pyright 1.1.362 ~/.config/coc/extensions/node_modules/coc-pyright
+ coc-json 1.9.2 ~/.config/coc/extensions/node_modules/coc-json
:CocInfo
vim version: NVIM v0.8.2
node version: v20.13.1
coc.nvim version: 0.0.82-7a50d4d9 2022-08-01 01:37:29 +0800
coc.nvim directory: /home/mike/.config/nvim/bundle/coc.nvim_release
term: xterm-256color
platform: linux
## Log of coc.nvim
2024-05-19T02:28:46.348 INFO (pid:62049) [plugin] - coc.nvim initialized with node: v20.13.1 after 70ms
2024-05-19T02:28:46.496 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:28:49.316 ERROR (pid:62049) [extensions] - Error on createExtension coc-pyright from /home/mike/.config/coc/extensions/node_modules/coc-pyright/lib/index.js TypeError: Cannot read properties of undefined (reading 'class')
at Object.<anonymous> (/home/mike/.config/coc/extensions/node_modules/coc-pyright/lib/index.js:112865:35)
at Module._compile (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:270:16156)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at i.require (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:270:16589)
at eee (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:270:17103)
at Object.activate (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:274:1311)
at Y_.activate (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:271:7448)
2024-05-19T02:28:49.372 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:28:50.193 INFO (pid:62049) [attach] - receive notification: jumpDefinition []
2024-05-19T02:28:50.197 ERROR (pid:62049) [node-client] - Error on notification "jumpDefinition": definition provider not found for current buffer, your language server doesn't support it. Error
at HM.echoError (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:35:1869)
at HM.<anonymous> (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:19061)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-19T02:28:50.197 ERROR (pid:62049) [attach] - Error: definition provider not found for current buffer, your language server doesn't support it.
at xC.checkProvier (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:5854)
at tC.request (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:288:2737)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async tC.gotoDefinition (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:288:4147)
at async SC.cocAction (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:17434)
at async HM.<anonymous> (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:19024)
2024-05-19T02:28:50.501 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:28:53.272 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:28:57.946 INFO (pid:62049) [attach] - receive notification: runCommand [ 'pyright.version' ]
2024-05-19T02:28:57.949 ERROR (pid:62049) [node-client] - Error on notification "runCommand": Command: pyright.version not found Error
at HM.echoError (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:35:1869)
at HM.<anonymous> (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:19061)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-19T02:28:57.950 ERROR (pid:62049) [attach] - Error: Command: pyright.version not found
at cte.executeCommand (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:278:28384)
at cte.fireCommand (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:278:28550)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async GD.runCommand (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:282:16245)
at async SC.cocAction (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:17434)
at async HM.<anonymous> (/home/mike/.config/nvim/bundle/coc.nvim_release/build/index.js:302:19024)
2024-05-19T02:28:58.270 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:31:32.319 INFO (pid:62049) [attach] - receive notification: runCommand [ 'workspace.showOutput', 'Pyright' ]
2024-05-19T02:31:32.660 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:36:00.864 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:39:13.553 INFO (pid:62049) [attach] - Request action: listNames []
2024-05-19T02:39:14.479 INFO (pid:62049) [attach] - receive notification: openList [ 'extensions' ]
2024-05-19T02:43:18.017 INFO (pid:62049) [attach] - receive notification: highlight []
2024-05-19T02:43:24.451 INFO (pid:62049) [attach] - receive notification: showInfo []
As I understand it, the key issue is:
2024-05-19T02:28:49.316 ERROR (pid:62049) [extensions] - Error on createExtension coc-pyright from /home/mike/.config/coc/extensions/node_modules/coc-pyright/lib/index.js TypeError: Cannot read properties of undefined (reading 'class')
0.0.82-7a50d4d9 2022-08-01
Your coc.nvim was outdated, upgraded and try again.
0.0.82-7a50d4d9 2022-08-01
Your coc.nvim was outdated, upgraded and try again.
I install it as stated in the documentation(https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#using-neobundle), and this exact version is installed: coc.nvim version: 0.0.82-7a50d4d9 2022-08-01 01:37:29 +0800
0.0.82-7a50d4d9 2022-08-01
Your coc.nvim was outdated, upgraded and try again.
I install it as stated in the documentation(https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#using-neobundle), and this exact version is installed:
coc.nvim version: 0.0.82-7a50d4d9 2022-08-01 01:37:29 +0800
Apparently, for NeoBundle in the vim config, you need to write the following line: NeoBundle 'neoclide/coc.nvim', {'branch': 'master', 'build': 'npm ci'}