nvim-neotest / neotest-go

MIT License
125 stars 43 forks source link

neotest-go not found? #22

Closed amaanq closed 1 year ago

amaanq commented 1 year ago

Here's my setup, maybe it has to do with having a conflicting module?

use({
    "nvim-neotest/neotest",
    requires = {
        "nvim-neotest/neotest-go",
        "mrcjkb/neotest-haskell",
        "haydenmeade/neotest-jest",
        "nvim-neotest/neotest-plenary",
        "nvim-neotest/neotest-python",
        "rouge8/neotest-rust",
    },
    config = function()
        require("neotest").setup({
            adapters = {
                require("neotest-go")({
                    args = { "-count=1", "-timeout=60s" },
                }),
                require("neotest-haskell"),
                require("neotest-jest"),
                require("neotest-plenary"),
                require("neotest-python")({
                    dap = { justMyCode = false },
                }),
                require("neotest-rust"),
            },
        })
    end,
})

Error:

packer.nvim: Error running config for neotest: [string "..."]:0: module 'neotest-go' not found:
    no field package.preload['neotest-go']
    no file './neotest-go.lua'
    no file '/home/amaanq/neovim/.deps/usr/share/luajit-2.1.0-beta3/neotest-go.lua'
    no file '/usr/local/share/lua/5.1/neotest-go.lua'
    no file '/usr/local/share/lua/5.1/neotest-go/init.lua'
    no file '/home/amaanq/neovim/.deps/usr/share/lua/5.1/neotest-go.lua'
    no file '/home/amaanq/neovim/.deps/usr/share/lua/5.1/neotest-go/init.lua'
    no file '/home/amaanq/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/neotest-go.lua'
    no file '/home/amaanq/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/neotest-go/init.lua'
    no file '/home/amaanq/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/neotest-go.lua'
    no file '/home/amaanq/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/neotest-go/init.lua'
    no file './neotest-go.so'
    no file '/usr/local/lib/lua/5.1/neotest-go.so'
    no file '/home/amaanq/neovim/.deps/usr/lib/lua/5.1/neotest-go.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file '/home/amaanq/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/neotest-go.so'
amaanq commented 1 year ago

nvm, this happens with all requires in the adapters section, advice/help on this would be great. :)

Davincible commented 1 year ago

@amaanq try taking them out of the requires section

amaanq commented 1 year ago

still occurs

Davincible commented 1 year ago

Try upgrading lua to v5.4 (and neovim to 0.8 if its not)

amaanq commented 1 year ago

Lua is 5.4.4, neovim is 0.9/dev

Davincible commented 1 year ago

Hm very strange. Next thing I would try is manually cloning, and instead of using the repo in packer use the absolute path to the clone, and run PackerSync again