jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.71k stars 310 forks source link

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

Closed p4-k4 closed 9 months ago

p4-k4 commented 1 year ago

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' 
physicophilic commented 1 year ago

Same for me @p4-k4

dstuessy commented 1 year ago

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

kidp2h commented 1 year ago

same issue

dstuessy commented 1 year ago

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

locle97 commented 1 year ago

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

locle97 commented 1 year ago

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

jazzabeanie commented 1 year ago

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:

jazzabeanie commented 1 year ago

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

jackMort commented 9 months ago

please reopen if issue still exists in newest version