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

Component not found #18

Open
gmnz opened this issue Sep 3, 2024 · 2 comments
Open

Component not found #18

gmnz opened this issue Sep 3, 2024 · 2 comments

Comments

@gmnz
Copy link

gmnz commented Sep 3, 2024

Hi,

In lsp mode inside nvim I get this error message:

image

but when I run "laravel-dev-tools views . > views-my-my.json" in the project root dir the component is listed in the .json file:

"common.components.pagination.index": "/home/michael/Code/staremesto/resources/views/common/components/pagination/index.blade.php",

How can I make the lsp detect the component too instead of giving me an error?

@arpangreat
Copy link

Just do composer install in the root of the folder.

@cbaconnier
Copy link

I'm experimenting the same issue.
Digging a bit, I'm getting the error when LSP is running

[ERROR][2024-10-24 10:25:17] .../vim/lsp/rpc.lua:770 "rpc" "/home/clement/.local/share/laravel-dev-tools/builds/laravel-dev-tools" "stderr" "PHP Fatal error: Cannot redeclare Amp\delay() (previously declared in phar:///home/clement/.local/share/laravel-dev-tools/builds/laravel-dev-tools/vendor/amphp/amp/lib/functions.php:132) in /home/clement/Projects/test-lsp/vendor/amphp/amp/src/functions.php on line 81\n"

This can also be replicated by running the command

./laravel-dev-tools helpers /home/clement/Projects/test-lsp

It may not be related at all, but I think the server conflict with newer versions of Laravel.

I have spatie/laravel-data and rector/rector in the project.
Both use amphp/amp:v3.0 meanwhile laravel-dev-tools has the v1 in the dependencies through phpactor/language-server

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

3 participants