nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua
Other
6.77k stars 600 forks source link

Module `nvim-tree.renderer.help` not found when install nvim-tree through Lazy #2744

Open xncbot opened 2 months ago

xncbot commented 2 months ago

Description

When install nvim-tree by Lazy, it throws below error when start nvim

Failed to run `config` for nvim-tree.lua

...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/init.lua:9: module
 'nvim-tree.renderer.help' not found:
^Ino field package.preload['nvim-tree.renderer.help']
cache_loader: module nvim-tree.renderer.help not found
cache_loader_lib: module nvim-tree.renderer.help not found
^Ino file './nvim-tree/renderer/help.lua'
^Ino file '/__w/neovim/neovim/.deps/usr/share/luajit-2.1/nvim-tree/re
nderer/help.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-tree/renderer/help.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-tree/renderer/help/init.lua'

^Ino file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/nvim-tree/rende
rer/help.lua'
^Ino file '/__w/neovim/neovim/.deps/usr/share/lua/5.1/nvim-tree/rende
rer/help/init.lua'
^Ino file './nvim-tree/renderer/help.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-tree/renderer/help.so'
^Ino file '/__w/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-tree/rendere
r/help.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file './nvim-tree.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-tree.so'
^Ino file '/__w/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-tree.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

# stacktrace:
  - ~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua/lua/nvim
-tree/renderer/init.lua:9
  - ~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua/lua/nvim
-tree/lib.lua:3
  - ~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua/lua/nvim
-tree.lua:4
  - plugin-nvim-tree.lua:9 _in_ **config**
  - ~/.config/nvim/lua/lazynvim-init.lua:15
  - ~/.config/nvim/init.lua:1

Below is my install lua script and file path

(24-04-09 23:31:15) <0> [~/.config/nvim]
dev-desk % tree
.
├── init.lua
├── lazy-lock.json
└── lua
    ├── lazynvim-init.lua
    └── plugins
        ├── plugin-lualine.lua
        └── plugin-nvim-tree.lua

plugin-nvim-tree.lua

return {
  "nvim-tree/nvim-tree.lua",
  version = "*",
  lazy = false,
  dependencies = {
    "nvim-tree/nvim-web-devicons",
  },
  config = function()
    require("nvim-tree").setup {}
  end,
}

init.lua

 require("lazynvim-init")

lazynvim-init

  local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
  if not vim.loop.fs_stat(lazypath) then
          vim.fn.system({
                  "git",
                  "clone",
                  "--filter=blob:none",
                  "https://github.com/folke/lazy.nvim.git",
                  "--branch=stable", -- latest stable release
                  lazypath,
          })
  end

  vim.opt.rtp:prepend(lazypath)

  require("lazy").setup("plugins")

Neovim version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

Operating system and version

Linux 5.10

Windows variant

No response

nvim-tree version

latest

Clean room replication

No `/tmp/nvt-min.lua` existing

Steps to reproduce

  1. Install Lazy
  2. Setup plugin script

plugin-nvim-tree.lua

return {
  "nvim-tree/nvim-tree.lua",
  version = "*",
  lazy = false,
  dependencies = {
    "nvim-tree/nvim-web-devicons",
  },
  config = function()
    require("nvim-tree").setup {}
  end,
}

Expected behavior

No response

Actual behavior

No response

alex-courtis commented 2 months ago

Can you please provide a replicator using a Clean Room

Lazy Loading is not recommended and we cannot diagnose issues with the plugin manager.