I am trying to install Astro Vim and after installation, I get prompted with a big block of lua errors. I asked some chatbot for what this might mean and it said that it’s probably due to an outdated version of nvim… I got the latest 0.10.0 stable. Does someone know on why this might be happening? I get a very similar error when installing nvchad. Here is the output from nvim once I open it

Error detected while processing /home/marty/.config/nvim/init.lua:
E5113: Error while calling lua chunk: vim/_init_packages.lua:0: module 'vim.uri' not found:
        no field package.preload['vim.uri']
        no file './vim/uri.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/vim/uri.lua'
        no file '/usr/local/share/lua/5.1/vim/uri.lua'
        no file '/usr/local/share/lua/5.1/vim/uri/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri/init.lua'
        no file './vim/uri.so'
        no file '/usr/local/lib/lua/5.1/vim/uri.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim/uri.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './vim.so'
        no file '/usr/local/lib/lua/5.1/vim.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: at 0x5586658aa190
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        ...marty/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:61: in function 'setup'
        /home/marty/.config/nvim/lua/lazy_setup.lua:1: in main chunk
        [C]: in function 'require'
        /home/marty/.config/nvim/init.lua:18: in main chunk
E484: Can't open file /usr/local/share/nvim/syntax/syntax.vim
  • Oscar
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 months ago

    How did you install neovim? If you installed from source, double check that you followed the instructions, i.e. install build dependencies and then run:

    make CMAKE_BUILD_TYPE=RelWithDebInfo
    sudo make install
    

    Also, double check the version of nvim in your PATH matches:

    nvim --version
    
    • Smorty [she/her]@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      2
      ·
      6 months ago

      Turns out I messed up at some point. According to the version command I did have 0.9.5, but some internal files were missing because I installed neovim manually (by extracting the files from their appimage). But now I have fixed it. I added the binary to my PATH and now everything works great. Even upgraded to 0.10.0 and it still works.