UltiRequiem / coc-cl

:wavy_dash: Common Lisp language extension for coc.nvim
MIT License
20 stars 4 forks source link

Error loading extension #4

Open jmdaemon opened 2 years ago

jmdaemon commented 2 years ago

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 commented 2 years ago

same error here

ex7763 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

jmdaemon commented 2 years ago
$ node -v
v18.0.0
UltiRequiem commented 2 years ago

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

UltiRequiem commented 2 years ago

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

jmdaemon commented 2 years ago

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

brainwo commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 390
2022-12-05T07:08:30.806 ERROR (pid:113472) [server] - unhandledRejection  Promise {
  <rejected> 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: [Function (anonymous)]
} 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)