coc-cl icon indicating copy to clipboard operation
coc-cl copied to clipboard

Error loading extension

Open jmdaemon opened this issue 3 years ago • 11 comments

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)

jmdaemon avatar Sep 11 '22 18:09 jmdaemon

same error here

ex7763 avatar Sep 15 '22 10:09 ex7763

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.

ex7763 avatar Sep 15 '22 11:09 ex7763

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.

Thanks a lot it worked.

GAMPR avatar Sep 16 '22 18:09 GAMPR

What node version are you all using? node: imports are supported from ~v16

UltiRequiem avatar Sep 16 '22 22:09 UltiRequiem

$ node -v
v18.0.0

jmdaemon avatar Sep 23 '22 01:09 jmdaemon

@jmdaemon did @ex7763 solution work for you? I think you have a different kind of problem.

UltiRequiem avatar Sep 24 '22 01:09 UltiRequiem

@jmdaemon How did you install this plugin? Classic :CocInstall or a plugin manager?

UltiRequiem avatar Sep 24 '22 01:09 UltiRequiem

@UltiRequiem I installed it with :CocInstall, and yes @ex7763 solution seems to work and build fine for me.

jmdaemon avatar Sep 25 '22 20:09 jmdaemon

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.

brainwo avatar Nov 30 '22 00:11 brainwo

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.

UltiRequiem avatar Dec 04 '22 22:12 UltiRequiem

Check if the binary is on the path, eg you can exec cl-lsp from 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)

brainwo avatar Dec 04 '22 23:12 brainwo