wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.9k stars 264 forks source link

Cant require conf #733

Closed bryant-the-coder closed 2 years ago

bryant-the-coder commented 2 years ago

Error:

Error detected while processing C:\Users\User\AppData\Local\nvim\lua\plugins\nvim-tree.lua:
E5113: Error while calling lua chunk: lua\plugins\nvim-tree.lua:1: module 'nvim-tree.config' not found:
        no field package.preload['nvim-tree.config']
        no file '.\nvim-tree\config.lua'
        no file 'C:\Users\User\AppData\Local\nvim\bin\lua\nvim-tree\config.lua'
        no file 'C:\Users\User\AppData\Local\nvim\bin\lua\nvim-tree\config\init.lua'
        no file 'C:\Users\User\AppData\Local\Temp\nvim\packer_hererocks\2.1.0-beta3\share\lua\5.1\nvim-tree\config.lua'
        no file 'C:\Users\User\AppData\Local\Temp\nvim\packer_hererocks\2.1.0-beta3\share\lua\5.1\nvim-tree\config\init.lua'
        no file 'C:\Users\User\AppData\Local\Temp\nvim\packer_hererocks\2.1.0-beta3\lib\luarocks\rocks-5.1\nvim-tree\config.lua'
        no file 'C:\Users\User\AppData\Local\Temp\nvim\packer_hererocks\2.1.0-beta3\lib\luarocks\rocks-5.1\nvim-tree\config\init.lua'
        no file '.\nvim-tree\config.dll'
        no file 'C:\Users\User\AppData\Local\nvim\bin\nvim-tree\config.dll'
        no file 'C:\Users\User\AppData\Local\nvim\bin\loadall.dll'
        no file 'C:\Users\User\AppData\Local\Temp\nvim\packer_hererocks\2.1.0-beta3\lib\lua\5.1\nvim-tree\config.so'
        no file '.\nvim-tree.dll'
        no file 'C:\Users\User\AppData\Local\nvim\bin\nvim-tree.dll'
        no file 'C:\Users\User\AppData\Local\nvim\bin\loadall.dll'
        no file 'C:\Users\User\AppData\Local\Temp\nvim\packer_hererocks\2.1.0-beta3\lib\lua\5.1\nvim-tree.so'
stack traceback:
        [C]: in function 'require'
        lua\plugins\nvim-tree.lua:1: in main chunk

my packer conf:

local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
  packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
end

return require('packer').startup(function()
    -- Packer can manage itself
    use "wbthomason/packer.nvim"

    -- Dependencies
    use "nvim-lua/plenary.nvim"
    use "kyazdani42/nvim-web-devicons"

    -- Theme
    use "folke/tokyonight.nvim"
    use "morhetz/gruvbox"
    use "drewtempelmeyer/palenight.vim"
    use "joshdick/onedark.vim"
    use "arcticicestudio/nord-vim"
    use {"rose-pine/neovim", as = "rose-pine"}

    -- Explorer menu
    use {"kyazdani42/nvim-tree.lua", cmd = "NvimTreeToggle", opt = true}

    -- Treesitter
    use {
        "nvim-treesitter/nvim-treesitter",
        run = ":TSUpdate",
    }
    use "p00f/nvim-ts-rainbow"
    use "nvim-treesitter/playground"
    use "windwp/nvim-ts-autotag"
    use "windwp/nvim-autopairs"

    -- Statusline
    use {
      "nvim-lualine/lualine.nvim",
      requires = {"kyazdani42/nvim-web-devicons", opt = true}
    }

    -- Telescope
    use "nvim-telescope/telescope.nvim"

    -- Dashboard
    use "glepnir/dashboard-nvim"

    -- Bufferline
    use "akinsho/bufferline.nvim"

    -- Colorizer
    use "norcalli/nvim-colorizer.lua"

    -- LSP
    use "neovim/nvim-lspconfig"
    use "hrsh7th/nvim-cmp"
    use "hrsh7th/cmp-nvim-lsp"
    use "hrsh7th/cmp-buffer"
    use "hrsh7th/cmp-path"
    use "onsails/lspkind-nvim"
    use "folke/lsp-colors.nvim"
    use "David-Kunz/cmp-npm"
    use "hrsh7th/cmp-vsnip"
    use "hrsh7th/vim-vsnip"

    -- Indentation
    use "lukas-reineke/indent-blankline.nvim"

    -- Auto-comment
    use "numToStr/Comment.nvim"
    use "JoosepAlviste/nvim-ts-context-commentstring"

    -- Terminal
    use "akinsho/toggleterm.nvim"

    -- Harpoon
    use "ThePrimeagen/harpoon"

    -- Disturbance free writing
    use {
    "folke/twilight.nvim",
    "folke/zen-mode.nvim"
    }

    -- Git
    use "lewis6991/gitsigns.nvim"

end)
bryant-the-coder commented 2 years ago

This error came out when use {"kyazdani42/nvim-tree.lua", cmd = "NvimTreeToggle", opt = true}

shadmansaleh commented 2 years ago

Did you run PackerSync and confirm it's not a nvim-tree issue?

bryant-the-coder commented 2 years ago

I did... It is not. I will reply once the cleaning of a flash flood is over at my area. I m using github on mobile btw... Take care and stay safe

shadmansaleh commented 2 years ago

I will reply once the cleaning of a flash flood is over at my area

ohh hopefully you're safe .

bryant-the-coder commented 2 years ago

Still can't

Cassin01 commented 2 years ago

@bryant-the-coder Can you try the code bellow.

use {"kyazdani42/nvim-tree.lua", cmd = "NvimTreeToggle", opt = true,  config = function() require'nvim-tree'.setup {} end}
bryant-the-coder commented 2 years ago

tbh i fixed this like long ago lol

chitransh93 commented 4 months ago

how did you fix it, I am trying astronvim installation and facing similar issue with polish:

Error detected while processing /home/auser/.config/nvim/init.lua: E5113: Error while calling lua chunk: /home/auser/.config/nvim/init.lua:19: module 'polish' not found: no field package.preload['polish'] cache_loader: module polish not found cache_loader_lib: module polish not found no file './polish.lua' no file '/home/auser/neovim/.deps/usr/share/luajit-2.1/polish.lua' no file '/usr/local/share/lua/5.1/polish.lua' no file '/usr/local/share/lua/5.1/polish/init.lua' no file '/home/auser/neovim/.deps/usr/share/lua/5.1/polish.lua' no file '/home/auser/neovim/.deps/usr/share/lua/5.1/polish/init.lua' no file './polish.so' no file '/usr/local/lib/lua/5.1/polish.so' no file '/home/auser/neovim/.deps/usr/lib/lua/5.1/polish.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /home/auser/.config/nvim/init.lua:19: in main chunk