Packer commands not working: cannot find modules

256 Views Asked by At

Up until recently, PackerSync worked perfectly. I don't recall changing anything that could've caused the PackerSync command to stop working.

When running the command, I get this error : module 'packer.luarocks' not found:

This is the whole stack trace :

E5108: Error executing lua ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: module 'packer.luarocks' not found:
        no field package.preload['packer.luarocks']
cache_loader: module packer.luarocks not found
cache_loader_lib: module packer.luarocks not found
        no file './packer/luarocks.lua'
        no file '/Users/younes/neovim/.deps/usr/share/luajit-2.1.0-beta3/packer/luarocks.lua'
        no file '/usr/local/share/lua/5.1/packer/luarocks.lua'
        no file '/usr/local/share/lua/5.1/packer/luarocks/init.lua'
        no file '/Users/younes/neovim/.deps/usr/share/lua/5.1/packer/luarocks.lua'
        no file '/Users/younes/neovim/.deps/usr/share/lua/5.1/packer/luarocks/init.lua'
        no file './packer/luarocks.so'
        no file '/usr/local/lib/lua/5.1/packer/luarocks.so'
        no file '/Users/younes/neovim/.deps/usr/lib/lua/5.1/packer/luarocks.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './packer.so'
        no file '/usr/local/lib/lua/5.1/packer.so'
        no file '/Users/younes/neovim/.deps/usr/lib/lua/5.1/packer.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: in function 'require_and_configure'
        ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:576: in function 'sync'
        [string ":lua"]:1: in main chunk

Checking the packer.lua file didn't give me much insight. It configures and calls luarocks. Nothing too special about it from what I've gathered.

- WARNING luarocks: not available
  -ADVICE:
    -spawn: luarocks failed with exit code - and signal -. luarocks is not executable

Also, I just realised that actually not one packer command works. It's always the same error, for example when I run PackerStatus I get the error: E5108: Error executing lua ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: module 'packer.display' not found

I have yet to find any solution or anyone with the same problem.

I also have a plugin (a vscode colortheme) installed with packer and it works perfectly.

I also tried to delete and re install packer, ran the PackerSync command, and it seemed like it downloaded the plugins but when I ran the command again I had the same issue.

1

There are 1 best solutions below

0
younes alaoui On

Couldn't find a solution for markdown-preview.nvim

I installed another plug-in called instant markdown preview and it works perfectly.

The problem was probably related to the plug-in itself and not to Packer.