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

prompts.lua:1: module 'telescope.pickers' not found

Open p4-k4 opened this issue 2 years ago • 8 comments

Getting the following on default config.

packer.nvim: Error running config for ChatGPT.nvim: ...e/pack/packer/start/ChatGPT.nvim/lua/chatgpt/prompts.lua:1: module 'telescope.pickers' not found:            
^Ino field package.preload['telescope.pickers']                                                                                                                     
^Ino file './telescope/pickers.lua'                                                                                                                                 
^Ino file '/usr/share/luajit-2.1.0-beta3/telescope/pickers.lua'                                                                                                     
^Ino file '/usr/local/share/lua/5.1/telescope/pickers.lua'                                                                                                          
^Ino file '/usr/local/share/lua/5.1/telescope/pickers/init.lua'                                                                                                     
^Ino file '/usr/share/lua/5.1/telescope/pickers.lua'                                                                                                                
^Ino file '/usr/share/lua/5.1/telescope/pickers/init.lua'                                                                                                           
^Ino file '/home/paka/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/telescope/pickers.lua'                                                                 
^Ino file '/home/paka/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/telescope/pickers/init.lua'                                                            
^Ino file '/home/paka/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/telescope/pickers.lua'                                                        
^Ino file '/home/paka/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/telescope/pickers/init.lua'                                                   
^Ino file './telescope/pickers.so'                                                                                                                                  
^Ino file '/usr/local/lib/lua/5.1/telescope/pickers.so'                                                                                                             
^Ino file '/usr/lib/lua/5.1/telescope/pickers.so'                                                                                                                   
^Ino file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                                       
^Ino file '/home/paka/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/telescope/pickers.so'                                                                    
^Ino file './telescope.so'                                                                                                                                          
^Ino file '/usr/local/lib/lua/5.1/telescope.so'                                                                                                                     
^Ino file '/usr/lib/lua/5.1/telescope.so'                                                                                                                           
^Ino file '/usr/local/lib/lua/5.1/loadall.so' 

p4-k4 avatar Feb 16 '23 13:02 p4-k4

Same for me @p4-k4

physicophilic avatar Feb 19 '23 12:02 physicophilic

I've been having this for a while too. Never got round to using the plugin more than once tbh as I can't seem to debug this properly. I have telescope installed, but for some reason it's not being found, or at least, nvim isn't looking for it in the right place for some reason

dstuessy avatar Feb 19 '23 16:02 dstuessy

same issue

kidp2h avatar Feb 20 '23 05:02 kidp2h

I managed to get around this issue by using the config proposed here: https://github.com/jackMort/ChatGPT.nvim/issues/22#issuecomment-1409277074

dstuessy avatar Feb 20 '23 09:02 dstuessy

I believe the issue happens with NVChad only. I tried to install with LunarVim and it worked as expected.

locle97 avatar Mar 01 '23 08:03 locle97

I have just found a work around as preloading telescope.nvim before running ChatGPT command require('packer').loader("telescope.nvim") need to be added in init.lua

locle97 avatar Mar 01 '23 20:03 locle97

I the tried the code from the readme, which didn't work.

    use({
      "jackMort/ChatGPT.nvim",
        config = function()
          require("chatgpt").setup({
            -- optional configuration
          })
        end,
        requires = {
          "MunifTanjim/nui.nvim",
          "nvim-lua/plenary.nvim",
          "nvim-telescope/telescope.nvim"
        }
    })

Then tried a bunch of things, none of which seemed to work. I removed everything back to the way it was above and it worked. What I tried:

  • setting opt = true
  • adding after = { "nvim-telescope/telescope.nvim" }
  • a few other things that I can't remember

jazzabeanie avatar Mar 16 '23 01:03 jazzabeanie

After restarting the problem has returned and can't reproduce my earlier fix.

jazzabeanie avatar Mar 16 '23 23:03 jazzabeanie

please reopen if issue still exists in newest version

jackMort avatar Dec 14 '23 12:12 jackMort