telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

Error at :checkhealth

Open Dowsley opened this issue 2 years ago • 11 comments

Description

At a freshly installed neovim, using the same exact configurations as neovim from scratch, the checkhealth fails during the execution of the health checker for telescope. It seems the error is in the fact that check_binary_installed is returning a nil value for the second return value, "version".

This error does not seem to affect the plugin functioning.

I am not well versed into vim, so I wonder if this is a permission-related issue in my system. Appreciate any heads-up and apologize in advance if this is not a bug in the plugin.

Neovim version

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Operating system and version

macOS 12.6 | Apple M1 Pro

Telescope version / branch / rev

telescope 0.1.0

checkhealth telescope

telescope: require("telescope.health").check()
========================================================================
  - ERROR: Failed to run healthcheck for "telescope" plugin. Exception:
    function health#check, line 20
    Vim(eval):E5108: Error executing lua ...ack/packer/start/telescope.nvim/lua/telescope/health.lua:98: attempt to perform arithmetic on local 'eol' (a nil value)
    stack traceback:
    ...ack/packer/start/telescope.nvim/lua/telescope/health.lua:98: in function 'check'
    [string "luaeval()"]:1: in main chunk

Steps to reproduce

  1. nvim
  2. :checkhealth

Expected behavior

Checkhealth does not show any errors.

Actual behavior

Checkhealth shows errors.

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('fzf')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]

Dowsley avatar Sep 18 '22 21:09 Dowsley

Have the same issue

amanchokshi avatar Oct 18 '22 01:10 amanchokshi

same here

scottspeidel avatar Oct 21 '22 00:10 scottspeidel

+1

fgr1986 avatar Oct 25 '22 09:10 fgr1986

Same issue here, although I did not have a fresh install. Updating telescope with packer is also failing.

rsulli55 avatar Oct 30 '22 15:10 rsulli55

same issue but I use vimplug Cant figure out how to make it run

CarloCattano avatar Dec 01 '22 08:12 CarloCattano

Guys, your fd version mismatched. Switch to the correct fd release to fit your computer framework.

ysl2 avatar Dec 14 '22 03:12 ysl2

I reinstalled fd and ripprep, and now it works very well!

lzlcs avatar Jan 19 '23 06:01 lzlcs

i did the same i reinstalled fd and ripgrep and it worked just fine

belkarto avatar Sep 20 '23 05:09 belkarto

I'm on Windows 10. Reinstalled both rg and fd using winget, restarted my machine, made sure that "Links" directory is in the path, made sure old dependencies are removed from the system, and I still get this error :(

telescope: require("telescope.health").check()

- ERROR Failed to run healthcheck for "telescope" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...l/nvim-data/lazy/telescope.nvim/lua/telescope/health.lua:9: attempt to index a boolean value
  stack traceback:
  ...l/nvim-data/lazy/telescope.nvim/lua/telescope/health.lua:9: in main chunk
  [C]: in function 'require'
  [string "luaeval()"]:1: in main chunk

It would be fantastic if the error said what's the problem instead of forcing the user to decipher what does indexing of a boolean value in the plugin could mean.

ashrasmun avatar Nov 11 '23 15:11 ashrasmun

@ashrasmun This looks like a different issue from the original issue. Can you provide which telescope branch/tag you're on and try the minimal config in the original issue description above? You can copy that snippet into a file and open neovim with nvim -nu path/to/min/config.lua (might need to relaunch after plugins install).

jamestrew avatar Nov 11 '23 20:11 jamestrew

I was getting this same issue. Reinstalled rg and fixed it :)

jamesgour avatar Dec 22 '23 01:12 jamesgour