lazy.nvim icon indicating copy to clipboard operation
lazy.nvim copied to clipboard

bug: Installation does not work on Manjaro with nvim 0.11.0

Open Raymi306 opened this issue 8 months ago • 3 comments

Did you check docs and existing issues?

  • [x] I have read all the lazy.nvim docs
  • [x] I have updated the plugin to the latest version before submitting this issue
  • [x] I have searched the existing issues of lazy.nvim
  • [x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.11.0

Operating system/version

Manjaro KDE Plasma Kernel Version: 6.12.21-4-MANJARO (64-bit)

Describe the bug

Attempting to install Lazy on Manjaro with nvim 0.11 results in an error.

Steps To Reproduce

I tried both the github release tarball and whatever flavor the AUR provides and confirmed both had LuaJIT support and that both were versions 0.11

:checkhealth only shows warnings for missing providers, all other items are green

I removed .config/nvim entirely.

I copied only the two files listed in https://lazy.folke.io/installation in to the correct locations (structured setup).

When starting nvim:

Note that I tried both init.vim lua require and init.lua, the logs that I had hanging around were from the init.vim run but were effectively identical

Error detected while processing /home/andrew/.config/nvim/init.vim:
line    4:
E5108: Error executing lua /home/andrew/.config/nvim/lua/config/lazy.lua:25: module 'lazy' not found:
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/usr/share/luajit-2.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/usr/share/lua/5.1/lazy.lua'
        no file '/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/usr/lib/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        /home/andrew/.config/nvim/lua/config/lazy.lua:25: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

Expected Behavior

Lazy should work with 0.11.0 on Manjaro

Raymi306 avatar Apr 12 '25 23:04 Raymi306

lazy.nvim was probably not cloned correctly. That's usually a problem with your git version/configuration in your OS.

dpetka2001 avatar Apr 13 '25 18:04 dpetka2001

I can clone other repositories without incident, is there something in particular I should investigate? I'm not familiar with lua, I think additional logging might help. If this is a git problem, that has nothing to do with the error above, and it seems like that could be caught earlier so a helpful message can be provided.

Raymi306 avatar Apr 14 '25 23:04 Raymi306

So. I printed the variable "lazypath", and I see: /home/andrew/.local/share/nvim/lazy/lazy.nvim

Notably, if we look at the error message I posted above, this path is not being tried by "require"

*edit:

I checked the run time path and it WAS there, not sure why the error message was weird. Went into the directory where the git repo was and ran git status. Everything was deleted. git reset --hard appears to have fixed my problems, I also removed the directory and let the install script try to clone things again and that succeeded too

Raymi306 avatar Apr 15 '25 01:04 Raymi306