doom-neovim / doom-nvim

A Neovim configuration for the advanced martian hacker
GNU General Public License v2.0
1.01k stars 107 forks source link

Module 'lspinstall' not found #55

Closed Silipwn closed 3 years ago

Silipwn commented 3 years ago

I've been seeing this issue for sometime while checking this project out, I'm not exactly sure how this is triggered. I've tried setup everything 4 times, and I usually end up at this error.

I manage to get everything installed but on reload, this comes up.

Error executing vim.schedule lua callback: /home/silipwn/.config/nvim/lua/doom/core/config/init.lua:421: module 'lspinstall' not found:                                     
        no field package.preload['lspinstall']                                        
        no file './lspinstall.lua'
.....

Is there something I'm missing to configure?

When I run ls ~/.local/share/nvim/site/pack/packer/start/ :

neogit vim-header

Version details:

nvim: v0.6.0-dev+12-gf515baedc doom-nvim: v3.0.7

NTBBloodbath commented 3 years ago

Hey, that's really strange for me because of

  1. The error line is pointing to a comment :confused:
  2. The function that triggers lspinstall in that file doesn't try to load that plugin if the plugin is not installed nor loaded

Can you please send the output of ls ~/.local/share/nvim/site/pack/packer/opt/nvim-lspinstall and check if lspinstall is there when you do PackerStatus?

jakethagle commented 3 years ago

I was also able to repro this on macOs Big Sur. I confirmed nvim-lspinstall existed in the path you asked for.

Error executing vim.schedule lua callback: /Users/jhagle/.config/nvim/lua/doom/core/config/init.lua:421: module 'lspinstall' not found:
        no field package.preload['lspinstall']
        no file './lspinstall.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/luajit-2.1.0-beta3/lspinstall.lua'
        no file '/usr/local/share/lua/5.1/lspinstall.lua'
        no file '/usr/local/share/lua/5.1/lspinstall/init.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/lspinstall.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/lspinstall/init.lua'
        no file '/Users/jhagle/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/lspinstall.lua'
        no file '/Users/jhagle/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/lspinstall/init.lua'
        no file '/Users/jhagle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/lspinstall.lua'
        no file '/Users/jhagle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/lspinstall/init.lua'
        no file './lspinstall.so'
        no file '/usr/local/lib/lua/5.1/lspinstall.so'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/lspinstall.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/Users/jhagle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/lspinstall.so'
Press ENTER or type command to continue

❯ ls ~/.local/share/nvim/site/pack/packer/opt/nvim-lspinstall
LICENSE   README.md logo.png  lua       plugin

                packer.nvim - Total plugins: 35
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 • lazygit.nvim (not loaded)
 • lsp_signature.nvim (not loaded)
 • which-key.nvim
 • lspsaga.nvim (not loaded)
 • nvim-lspconfig
 • minimap.vim (not loaded)
 • nvim-bufferline.lua (not loaded)
 • nvim-colorizer.lua
 • neorg (not loaded)
 • nvim-treesitter (not loaded)
 • nvim-autopairs (not loaded)
 • nvim-lspinstall (not loaded)
 • LuaSnip (not loaded)
 • nvim-compe (not loaded)
 • nvim-toggleterm.lua (not loaded)
 • auto-session (not loaded)
 • nvim-tree.lua (not loaded)
 • cmd-parser.nvim (not loaded)
 • dashboard-nvim (not loaded)
 • doom-themes.nvim (not loaded)
 • editorconfig-vim (not loaded)
 • format.nvim (not loaded)
 • nvim-web-devicons (not loaded)
 • packer.nvim (not loaded)
 • plenary.nvim (not loaded)
 • popup.nvim (not loaded)
 • range-highlight.nvim (not loaded)
 • gitsigns.nvim (not loaded)
 • telescope.nvim (not loaded)
 • session-lens (not loaded)
 • indent-blankline.nvim (not loaded)
 • galaxyline.nvim (not loaded)
 • symbols-outline.nvim (not loaded)
 • kommentary
 • friendly-snippets (not loaded)
lavixta commented 3 years ago

I have the same issue, but as i moved or remove ~/.local/share/nvim/site/pack/packer/ to another file and reinstall doom-nvim, reinstall packer . The problem solve

Silipwn commented 3 years ago

I was temporarily able to fix it by removing everything inside packer directory. rm -rf ~/.local/share/nvim/site/pack/packer/.

NTBBloodbath commented 3 years ago

Hey, sorry for the late reply.

So can we think that was an issue with the plugins? I was trying to reproduce it but I was unable to:(

Silipwn commented 3 years ago

Yeah, I guess we can close this for now. If someone else is able to reproduce it, they can refer to the fix above. I hope it worked for @jakethagle as well.

jakethagle commented 3 years ago

I have more info on this. I managed to repro it by updating the languages in my doomrc to include a new one to be installed for lsp. Upon restarting doom-nvim I got this stack trace. By doing an rm -rf ~/.local/share/nvim/lspinstall I was able to resolve my issue and it reinstalled all of the correct language servers.