Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading extension #4

Open
jmdaemon opened this issue Sep 11, 2022 · 11 comments
Open

Error loading extension #4

jmdaemon opened this issue Sep 11, 2022 · 11 comments

Comments

@jmdaemon
Copy link

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)
@ex7763
Copy link

ex7763 commented Sep 15, 2022

same error here

@ex7763
Copy link

ex7763 commented Sep 15, 2022

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.

@GAMPR
Copy link

GAMPR commented Sep 16, 2022

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.

@UltiRequiem
Copy link
Owner

UltiRequiem commented Sep 16, 2022

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

@jmdaemon
Copy link
Author

jmdaemon commented Sep 23, 2022

$ node -v
v18.0.0

@UltiRequiem
Copy link
Owner

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

@UltiRequiem
Copy link
Owner

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

@jmdaemon
Copy link
Author

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

@brainwo
Copy link

brainwo commented Nov 30, 2022

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 coc-cl@0.2.1: The engine "coc" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > coc.nvim@0.0.80" has incorrect peer dependency "@types/node@10.12.0".
warning "xo > eslint-import-resolver-webpack@0.13.2" 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 coc-cl@0.2.1: The engine "coc" appears to be invalid.
$ node esbuild.js
Done in 0.25s.

@UltiRequiem
Copy link
Owner

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.

@brainwo
Copy link

brainwo commented Dec 4, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants