nvim icon indicating copy to clipboard operation
nvim copied to clipboard

Installation errors

Open diocletiann opened this issue 3 years ago • 19 comments

After packer is done installing, all future starts of nvim show the errors below, I'm not sure what's going on.

packer.nvim: Error running config for refactoring.nvim: ...ck/packer/opt/refactoring.nvim/lua/refactoring/query.lua:1: module 'nvim-treesitter.parsers' not found:
^Ino field package.preload['nvim-treesitter.parsers']No cache entry
^Ino file './nvim-treesitter/parsers.lua'
^Ino file '/home/user/repos/neovim/.deps/usr/share/luajit-2.1.0-beta3/nvim-treesitter/parsers.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-treesitter/parsers.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-treesitter/parsers/init.lua'
^Ino file '/home/user/repos/neovim/.deps/usr/share/lua/5.1/nvim-treesitter/parsers.lua'
^Ino file '/home/user/repos/neovim/.deps/usr/share/lua/5.1/nvim-treesitter/parsers/init.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-treesitter/parsers.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-treesitter/parsers/init.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-treesitter/parsers.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-treesitter/parsers/init.lua'
^Ino file './nvim-treesitter/parsers.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-treesitter/parsers.so'
^Ino file '/home/user/repos/neovim/.deps/usr/lib/lua/5.1/nvim-treesitter/parsers.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-treesitter/parsers.so'
^Ino file './nvim-treesitter.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/home/user/repos/neovim/.deps/usr/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-treesitter.so'
Press ENTER or type command to continue
Error executing vim.schedule lua callback: /home/user/.config/nvim/lua/core/lazy.lua:140: Vim(lua):E5108: Error executing lua /home/user/.config/nvim/lua/utils/log.lua:24: bad argument #1 to 'close' (FILE
* expected, got nil)
stack traceback:
        [C]: in function 'close'
        /home/user/.config/nvim/lua/utils/log.lua:24: in function 'lprint'
        /home/user/.config/nvim/lua/core/lazy.lua:45: in function 'Lazyload'
        [string ":lua"]:1: in main chunk
        [C]: in function 'cmd'
        /home/user/.config/nvim/lua/core/lazy.lua:140: in function 'fn'
        vim.lua:415: in function 'cb'
        vim.lua:285: in function <vim.lua:285>
stack traceback:
        [C]: in function 'cmd'
        /home/user/.config/nvim/lua/core/lazy.lua:140: in function 'fn'
        vim.lua:415: in function 'cb'
        vim.lua:285: in function <vim.lua:285>
Press ENTER or type command to continue
packer.nvim: Error running config for telescope-frecency.nvim: ...nvim/site/pack/packer/opt/sqlite.lua/lua/sqlite/defs.lua:29: libsqlite3.so: cannot open shared object file: No such file or directory
Press ENTER or type command to continue
packer.nvim: Error running config for neogen: ...al/share/nvim/site/pack/packer/opt/neogen/lua/neogen.lua:2: neogen requires nvim-treesitter to operate :(
Press ENTER or type command to continue

diocletiann avatar Dec 18 '21 16:12 diocletiann

You may need to run PackerCompile after all package installed. If it does not fix the problem, maybe it caused by refactor.nvim. please switch to nulls branch to see if you still see that error.

ray-x avatar Dec 18 '21 21:12 ray-x

Just to make sure, after the first automated Packer run that installs all packages, run PackerCompile and restart Neovim? Thanks.

diocletiann avatar Dec 19 '21 16:12 diocletiann

after installing all packages, restart nvim and if you see errors, please run PackerCompile and restart nvim again. If you are using latest version, The behavior should be

  1. install all packages
  2. restart, the startup script should run PackerCompile for you automatically
  3. restart and treesitter will be installed automatically and you can begin use it.

ray-x avatar Dec 19 '21 20:12 ray-x

I have same issue , I said need to give it a retry in virtual machine to get used to it faced failing 3 plugins installations then having same error.

khatibomar avatar Jan 11 '22 13:01 khatibomar

Is it because of windows?

ray-x avatar Jan 11 '22 14:01 ray-x

May related to log file folder not existed. Added a fix for it. Other than that, the treesitter parsers will need some time to fully install.

ray-x avatar Jan 11 '22 14:01 ray-x

Nop I am on linux first time I tried to install on local machine couple of months ago , now on mx-linux in an VM ware to play with the setup before switch my main workflow.

khatibomar avatar Jan 11 '22 15:01 khatibomar

Getting same error again I pulled last commit fix.

[No Name]                                                                                                     
Error executing vim.schedule lua callback: /home/mx/.config/nvim/lua/core/lazy.lua:168: Vim(lua):E5108: Error
executing lua /home/mx/.config/nvim/lua/utils/log.lua:25: bad argument #1 to 'close' (FILE* expected, got nil)

stack traceback:
        [C]: in function 'close'
        /home/mx/.config/nvim/lua/utils/log.lua:25: in function 'lprint'
        /home/mx/.config/nvim/lua/core/lazy.lua:51: in function 'Lazyload'
        [string ":lua"]:1: in main chunk
        [C]: in function 'cmd'
        /home/mx/.config/nvim/lua/core/lazy.lua:168: in function 'fn'
        vim.lua:415: in function 'cb'
        vim.lua:285: in function <vim.lua:285>
stack traceback:
        [C]: in function 'cmd'
        /home/mx/.config/nvim/lua/core/lazy.lua:168: in function 'fn'
        vim.lua:415: in function 'cb'
        vim.lua:285: in function <vim.lua:285>
Press ENTER or type command to continue
Error executing vim.schedule lua callback: /home/mx/.config/nvim/lua/core/lazy.lua:174: Vim:E492: Not an edito
r command: TSEnableAll highlight 
stack traceback:
        [C]: in function 'cmd'
        /home/mx/.config/nvim/lua/core/lazy.lua:174: in function 'fn'
        vim.lua:415: in function 'cb'
        vim.lua:285: in function <vim.lua:285>
Press ENTER or type command to continue
packer.nvim: Error running config for telescope-frecency.nvim: ...nvim/site/pack/packer/opt/sqlite.lua/lua/sql
ite/defs.lua:29: libsqlite3.so: cannot open shared object file: No such file or directory
Press ENTER or type command to continue

khatibomar avatar Jan 11 '22 15:01 khatibomar

It caused by incorrect permission of ~/tmp

Please pull the latest version and remove the folder ~/tmp or change the folder permission to 755, and run the setup again. Thanks!

ray-x avatar Jan 11 '22 21:01 ray-x

it looks like the error is fixed now , but why using the ~/tmp not the OS default tmp folder? like /tmp and %APPDATA on windows? other thing I got this error

libsqlite3.so: cannot open shared object file: No such file or directory

it's straight forward installing libsqlite3-dev fix it

khatibomar avatar Jan 11 '22 22:01 khatibomar

I am not aware sqlite is not default installed. I will update the README.md as for use ~/tmp as log folder. I felt default tmp folder path is too long at that time.

ray-x avatar Jan 11 '22 22:01 ray-x

putting the tmp folder in home is bad thing first you are creating a tmp folder but OS provide one for you and maybe some error happens and program can't clean the tmp folder you created , so using default OS folder instead. Also it polute the home for users. Maybe make helper function to get the tmp folder for OS same as in Go the function that return the user TempDir if the logs are necessary to be stored then store them in default config folder but please not in home 👍🏻

khatibomar avatar Jan 12 '22 14:01 khatibomar

Error detected while processing /home/mx/.local/share/nvim/site/pack/packer/opt/starry.nvim/colors/moonlig
ht.vim:                                                                                                   
line    4:                                                                                                
E5108: Error executing lua [string ":lua"]:1: module 'starry' not found:                                  
        no field package.preload['starry']                                                                
        no file './starry.lua'                                                                            
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/starry.lua'           
        no file '/usr/local/share/lua/5.1/starry.lua'                                                     
        no file '/usr/local/share/lua/5.1/starry/init.lua'                                                
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/starry.lua'                      
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/starry/init.lua'                 
        no file '/home/mx/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/starry.lua'              
        no file '/home/mx/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/starry/init.lua'         
        no file '/home/mx/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/starry.lua'     
        no file '/home/mx/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/starry/init.lua'
                                                                                                          
        no file './starry.so'                                                                             
        no file '/usr/local/lib/lua/5.1/starry.so'                                                        
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/starry.so'                         
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                       
        no file '/home/mx/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/starry.so'                 
stack traceback:                                                                                          
        [C]: in function 'require'                                                                        
        [string ":lua"]:1: in main chunk                                                                  

got this error when chaning colorscheme to moonlight also other themes.

khatibomar avatar Jan 12 '22 14:01 khatibomar

Thanks, will change the log folder to neovim default log folder. As for the error change scheme. All colorscheme is loaded lazily (except the current one). You may need to packadd starry.nvim before you switch to that colorscheme.

ray-x avatar Jan 12 '22 21:01 ray-x

I'm getting stuck around installing 50/128 plugins. I disabled worktree which kept failing and changed vim-clap to clap#installer#build_all so it would compile an arm64 version for Apple M1. Now I can't tell what is causing the issue. Changed packer log to debug and all it says [DEBUG Fri Jan 21 11:39:59 2022 1.094531057511e+15] ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:569: Running tasks

diocletiann avatar Jan 21 '22 16:01 diocletiann

I do not have a M1 to reproduce. Also, the setup should download clap binary instead of rebuild from scratch.

ray-x avatar Jan 22 '22 11:01 ray-x

Unfortunately vim-clap and a few others don't provide arm64-darwin binaries. I'm happy to figure out which plugins are breaking but I don't know where to look.

diocletiann avatar Jan 22 '22 17:01 diocletiann

packer.nvim: Error running config for aurora: [string "..."]:0: Vim(lua):E5108: Error executing lua ...al/share/nvim/site/pack/packer/opt/aurora/lua/aurora.lua:36: invalid key: underdouble stack traceback: ^I[C]: in function 'nvim_set_hl' ^I...al/share/nvim/site/pack/packer/opt/aurora/lua/aurora.lua:36: in function 'colorscheme' ^I[string ":lua"]:1: in main chunk ^I[C]: in function 'cmd' ^I[string "..."]: in function <[string "..."]:0> ^I[C]: in function 'pcall' ^I...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:50: in function 'loader_apply_config' ^I...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:145: in function <...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:118> ^I[C]: in function 'pcall' ^I...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:162: in function <...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:161> ^I...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:783: in function 'loader' ^I/home/tat/.config/nvim/lua/core/lazy.lua:73: in function 'load_colorscheme' ^I/home/tat/.config/nvim/lua/core/lazy.lua:77: in main chunk ^I[C]: in function 'require' ^I/home/tat/.config/nvim/lua/core/init.lua:74: in function 'load_core' ^I/home/tat/.config/nvim/lua/core/init.lua:80: in main chunk ^I[C]: in function 'require'

Error executing vim.schedule lua callback: /home/tat/.config/nvim/lua/modules/editor/hydra.lua:1: module 'hydra' not found: no field package.preload['hydra'] no file './hydra.lua' no file '/usr/share/luajit-2.1.0-beta3/hydra.lua' no file '/usr/local/share/lua/5.1/hydra.lua' no file '/usr/local/share/lua/5.1/hydra/init.lua' no file '/usr/share/lua/5.1/hydra.lua' no file '/usr/share/lua/5.1/hydra/init.lua' no file '/home/tat/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/hydra.lua' no file '/home/tat/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/hydra/init.lua' no file '/home/tat/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/hydra.lua' no file '/home/tat/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/hydra/init.lua' no file './hydra.so' no file '/usr/local/lib/lua/5.1/hydra.so' no file '/usr/lib/lua/5.1/hydra.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/home/tat/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/hydra.so' stack traceback: [C]: in function 'require' /home/tat/.config/nvim/lua/modules/editor/hydra.lua:1: in main chunk [C]: in function 'require' /home/tat/.config/nvim/lua/core/lazy.lua:215: in function '' vim/_editor.lua: in function '' vim/_editor.lua: in function <vim/_editor.lua:0> tks

Syuq avatar Aug 21 '22 14:08 Syuq

You are loading nvim 0.7.x I am not awared that some of the setup not working in 0.7.x. It was fixed. Please update the repo and update aurora. It should be fixed.

ray-x avatar Aug 21 '22 22:08 ray-x