phpactor / coc-phpactor

Phpactor CoC Extension
https://github.com/phpactor/phpactor
MIT License
28 stars 3 forks source link

UnhandledRejection: Launching server "phpactor" using command phpactor failed #12

Closed GiancarloAparicio closed 3 years ago

GiancarloAparicio commented 3 years ago

When I open a php file I get this error, I have tried to use phpactor with Plug, cocInstall, coc file but in all cases I get that error

image The same thing comes out in messages. Also completely uninstall neovim but the error persists :(

The versions I use are: neovim 0.4.4 nodejs 15.13.0 python 3.7.0

dantleech commented 3 years ago

It requires at least PHP 7.3 if that's any help. Can you run phpactor from the CLI?

GiancarloAparicio commented 3 years ago

@dantleech hello, thank you for taking the time to help me.

As you mentioned, I couldn't use the cli either, silly me that used to install the plugin as " Plug 'phpactor/phpactor' " I didn't read the documentation where it clearly says that should be used, " Plug 'phpactor/phpactor', {'for': 'php', 'tag': '*', 'do': 'composer install --no-dev -o'} "

image However, after successfully installing phpactor and having the cli, the error persists :(

The output of the phpactor.status command is: image

For now I have only limited myself to uninstalling coc.phpactor so that the error disappears

dantleech commented 3 years ago

Maybe :CocCommand workspace.showOutput phpactor shows some more useful output? Otherwise you could enable the Phpactor logs https://phpactor.readthedocs.io/en/master/other/developing.html#logging

GiancarloAparicio commented 3 years ago

Apparently it was a conflict with some dependencies, the following fix my problem :)

apt install php7.4-intl php7.4-curl 
composer require beberlei/assert dantleech/what-changed phpbench/phpbench
dantleech commented 3 years ago

Oh that's strange -- do you have the exact error message you encountered? At least one of those packages needs fixing

GiancarloAparicio commented 3 years ago

I did not save the error message, but what I did was use the phpactor cli from the shell and I got an error where it said that the 3 previous packages were not found and those packages depended on php-intl and php-curl, maybe that's why phpactor could not be installed correctly and I got that error

dantleech commented 3 years ago

hm, I can understand if composer said that it required intl and curl extensions, in which case it's not a bug (although it can be reported better). But then a composer install should have been fine after installing those extensions I guess.