coc-cl
coc-cl copied to clipboard
Error loading extension
I seem to get this error after installing the extension for version 0.2.1:
2022-09-11T11:18:47.415 ERROR (pid:40214) [extensions] - Error on load ~/.config/coc/extensions/node_modules/coc-cl Error: main file lib/index.js not found, you may need to build the project.
at BF.checkDirectory (~/.config/nvim/plugged/coc.nvim/build/index.js:265:4062)
at ~/.config/nvim/plugged/coc.nvim/build/index.js:262:8447
at new Promise (<anonymous>)
at ~/.config/nvim/plugged/coc.nvim/build/index.js:262:8367
at Array.map (<anonymous>)
at BF.globalExtensionStats (~/.config/nvim/plugged/coc.nvim/build/index.js:262:8360)
at BF.init (~/.config/nvim/plugged/coc.nvim/build/index.js:261:20777)
at fC.init (~/.config/nvim/plugged/coc.nvim/build/index.js:293:18496)
at ~/.config/nvim/plugged/coc.nvim/build/index.js:293:21876
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
same error here
In src/index.ts, modify
import process from 'node:process';
to
import process from 'process';
and
In coc-cl
yarn install --frozen-lockfile && yarn build
This method can solve my problem.
In
src/index.ts, modifyimport process from 'node:process';to
import process from 'process';and
In
coc-clyarn install --frozen-lockfile && yarn buildThis method can solve my problem.
Thanks a lot it worked.
What node version are you all using? node: imports are supported from ~v16
$ node -v
v18.0.0
@jmdaemon did @ex7763 solution work for you? I think you have a different kind of problem.
@jmdaemon How did you install this plugin? Classic :CocInstall or a plugin manager?
@UltiRequiem I installed it with :CocInstall, and yes @ex7763 solution seems to work and build fine for me.
I tried the fix, but then it gives me a new error:
[coc.nvim]: UnhandledRejection: Launching server "cl-lsp" using command cl-lsp failed.
Error: Launching server "cl-lsp" using command cl-lsp failed.
Log from the yarn build command:
yarn install v1.22.19
warning ../../package.json: No license field
info No lockfile found.
[1/5] Validating package.json...
warning [email protected]: The engine "coc" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "@types/[email protected]".
warning "xo > [email protected]" has unmet peer dependency "webpack@>=1.11.0".
[5/5] Building fresh packages...
$ node esbuild.js
Done in 61.70s.
yarn run v1.22.19
warning ../../package.json: No license field
warning [email protected]: The engine "coc" appears to be invalid.
$ node esbuild.js
Done in 0.25s.
Launching server "cl-lsp" using command cl-lsp failed.
Check if the binary is on the path, eg you can exec cl-lsp from normal cli.
Check if the binary is on the path, eg you can exec
cl-lspfrom normal cli.
I have installed cl-lsp via roswell ros install lem-project/lem cxxxr/cl-lsp and roswell path to my zshrc: export PATH=$PATH:/home/$USER/.roswell/bin.
I can confirm it by running cl-lsp from terminal.
I also have specify the server path on coc-settings "lisp.serverPath": "/home/user/.roswell/bin/cl-lsp".
But the error still persists:
2022-12-05T07:08:30.783 INFO (pid:113472) [plugin] - coc.nvim initialized with node: v19.2.0 after [33m390[39m
2022-12-05T07:08:30.806 ERROR (pid:113472) [server] - unhandledRejection Promise {
[36m<rejected>[39m Error: Launching server "cl-lsp" using command cl-lsp failed.
at /home/user/.local/share/nvim/plugged/coc.nvim/build/index.js:252:6344
at async td.createConnection (/home/user/.local/share/nvim/plugged/coc.nvim/build/index.js:248:10632)
at async td._start (/home/user/.local/share/nvim/plugged/coc.nvim/build/index.js:248:2780),
dispose: [36m[Function (anonymous)][39m
} Error: Launching server "cl-lsp" using command cl-lsp failed.
at /home/user/.local/share/nvim/plugged/coc.nvim/build/index.js:252:6344
at async td.createConnection (/home/user/.local/share/nvim/plugged/coc.nvim/build/index.js:248:10632)
at async td._start (/home/user/.local/share/nvim/plugged/coc.nvim/build/index.js:248:2780)