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

bug: attempt to index field 'uv' (a nil value) #1374

Closed
3 tasks done
romain-pilard opened this issue Mar 22, 2024 · 12 comments
Closed
3 tasks done

bug: attempt to index field 'uv' (a nil value) #1374

romain-pilard opened this issue Mar 22, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@romain-pilard
Copy link

Did you check docs and existing issues?

  • I have read all the lazy.nvim docs
  • I have searched the existing issues of lazy.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.9.5

Operating system/version

Arch Linux 6.8.1

Describe the bug

  • ERROR Failed to run healthcheck for "lazy" plugin. Exception:
    function health#check, line 25
    Vim(eval):E5108: Error executing lua ...ain/.local/share/nvim/lazy/lazy.nvim/lua/lazy/health.lua:29: attempt to index field 'uv' (a nil value)

Steps To Reproduce

  1. Update to v10.18.0
  2. Run :checkhealth

Expected Behavior

:checkhealth run w/o exception.

Repro

No response

@romain-pilard romain-pilard added the bug Something isn't working label Mar 22, 2024
@folke
Copy link
Owner

folke commented Mar 22, 2024

Ia already fixed and released

@folke folke closed this as completed Mar 22, 2024
@beast911
Copy link

any steps on how to reinstall lazy ? it wont start because of the broken version now

@SoichiroYamane
Copy link

To reinstall fixed version, back up your local files

mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}

And then, rerun nvim

@yshiyuan
Copy link

any steps on how to reinstall lazy ? it wont start because of the broken version now

I fix it in this way.
edit ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/inti.lua+5
modify "vim.uv = vim.uv or vim.uv" to "vim.uv = vim.uv or vim.loop"
then you can enter nvim normally and reinstall lazy.nvim by its own ui

@folke
Copy link
Owner

folke commented Mar 22, 2024

For others running into this, just remove lazy and let it re-install itself.

rm -rf ~/.local/share/nvim/lazy/lazy.nvim

@tylercecil
Copy link

I'm actually still having this problem. Fresh install. If I check .local/share/nvim/lazy/lazy.nvim/lua/lazy/core/config.lua I see M.version = "10.19.0".

@tylercecil
Copy link

I ended up checkout out version 10.17.0, and things work as expected. Are we sure the fix worked?

@folke
Copy link
Owner

folke commented Mar 23, 2024

Yes, unless require('lazy') is not the first lazy module you require.

@folke
Copy link
Owner

folke commented Mar 23, 2024

@tylercecil if you're using LazyVim, then you also need to update that

@rcmosher
Copy link

rcmosher commented Mar 27, 2024

I just copied the install to a fresh init.lua, using nvim appimage v0.9.5 with no configuration and I get the error. To resolve it I had to swap uv with loop (found in an older tutorial) and it worked. If I switch back to uv it still doesn't work.

@folke
Copy link
Owner

folke commented Mar 27, 2024

That's because you used vim.uv in the bootstrap code.

The readme has been updated to correct this

https://github.com/folke/lazy.nvim?tab=readme-ov-file#-installation

@looserouting
Copy link

looserouting commented Mar 28, 2024

I encountered the same problem. I installed neovim from AUR(0.9.5). Only the bootstrap code was in init.lua.

The error disappears after I inserted setup(). Since it was step 2 I did not add it at first.

require("lazy").setup("plugins")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants