Attempt to call field 'path_expand' (a nil value)
Description
Intermittently when running nvim-telescope I get
E5108: Error executing lua: ...re/nvim/lazy/telescope.nvim/lua/telescope/make_entry.lua:152: attempt to call field 'path_expand' (a nil value)
stack traceback:
...re/nvim/lazy/telescope.nvim/lua/telescope/make_entry.lua:152: in function 'gen_from_file'
...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:341: in function 'v'
...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:595: in function 'v'
.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:543: in function <.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:502>
This is probably to this issue but I don't think I have packer locally? Any help to debug this would be appreciated.
Neovim version
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713484068
Operating system and version
Debian 12 (bookworm)
Telescope version / branch / rev
telescope 0.1.8
checkhealth telescope
==============================================================================
telescope: require("telescope.health").check()
Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.
Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities
===== Installed extensions ===== ~
Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured
Steps to reproduce
This issue does not happen deterministically, it has something to do with order of invocation between fzf and telescope as they are used together in my config: https://github.com/nettrino/vimconf. See telescope.lua
I get the issue when opening a new window and then triggering fzf via ,ff in my config.
Expected behavior
No response
Actual behavior
Getting
E5108: Error executing lua: ...re/nvim/lazy/telescope.nvim/lua/telescope/make_entry.lua:152: attempt to call field 'path_expand' (a nil value)
stack traceback:
...re/nvim/lazy/telescope.nvim/lua/telescope/make_entry.lua:152: in function 'gen_from_file'
...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:341: in function 'v'
...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:595: in function 'v'
.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:543: in function <.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:502>
when triggering fzf after vim
Minimal config
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
require("telescope").setup {}
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
I also get this fairly frequently
Strange issue. Error seems to indicate that a function that's defined in the code, doesn't exist. I'm not sure how that's possible.
I got this upgrading to telescope 1.8 (from 1.2). Running rm -rf ~/.local/share/nvim/lazy and restarting neovim seems to have fixed it. That's slightly severe actually, I think just deleting the telescope directory would have worked too
This issue popped up today. not sure what is causing it since LazyVim updates plugins on start. When I use the 01.6 tag the issue is gone.
telescope: require("telescope.health").check()
Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.
Checking external dependencies ~
- OK rg: found ripgrep 14.1.1
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities