AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.2k stars 242 forks source link

[ FIXED ] Failed to run generator with laravel pack #1116

Closed MrMic closed 3 months ago

MrMic commented 3 months ago

Checklist

Neovim version (nvim -v)

0.10.0

Operating system/version

Linux Ubuntu 22.04

Terminal/GUI

kitty

Describe the bug

Inside a laravel project I got this issue:

[null-ls] failed to run generator: ...share/AstroNvim4/lazy/laravel.nvim/lua/laravel/paths.lua:25: attempt to index local 'path' (a nil value)

laravel-dev-generators is in my path. I have also reinstall all from scratch. In VS Code, this project is working perfectly...

Steps to Reproduce

see above

Expected behavior

have the laravel goodies working (artisan ...)

Screenshots

No response

Additional Context

No response

Minimal configuration

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- install plugins
local plugins = {
    { "AstroNvim/AstroNvim", import = "astronvim.plugins" },
    { "AstroNvim/astrocommunity" },

    { import = "astrocommunity.pack.php" },
        { import = "astrocommunity.pack.html-css" },
        { import = "astrocommunity.pack.blade" },
    { import = "astrocommunity.pack.laravel" },

    -- add any other plugins/customizations here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

With this repro.lua file I also got this issue:

No specs found for module astrocommunity.pack.laravel

Uzaaft commented 3 months ago

@ALameLlama Do you have any idea what may cause this?

Uzaaft commented 3 months ago

Fixed the issue since the repro.lua wasn't working.

Uzaaft commented 3 months ago

Tried with: https://github.com/alexeymezenin/laravel-realworld-example-app Couldn't reproduce this myself.

MrMic commented 3 months ago

The GitHub project you provided works fine, as does mine. I also can have Laravel_Diagnostics working but not in my project... https://github.com/MrMic/LARAVEL-Project01

ALameLlama commented 3 months ago

I'll see if I can recreate

Uzaaft commented 3 months ago

No issue with your project @MrMic

ALameLlama commented 3 months ago

@MrMic @Uzaaft I've tried on a few Laravel projects including that repo you provided without getting that error.

Is there anything else you're doing to trigger it?

MrMic commented 3 months ago

Nope! It is a basic laravel project. Nothing fancy.

MrMic commented 3 months ago

I tried to create another new project from scratch with:

composer create-project laravel/laravel example-app

and all seems working as expected. Idk what I have done wrong with my previous project. Will start anew my project. 😥

I will close and if something wrong happens I will open a new ticket.

Thanks all for your help. I appreciate. 👍