treemux icon indicating copy to clipboard operation
treemux copied to clipboard

crashing

Open plutonium-239 opened this issue 1 year ago • 8 comments

Hi, I'm trying to use this plugin but it crashes every time I try to open it (prefix+TAB).

It only returns this error:

'/home/<>/.tmux/plugins/treemux/scripts/toggle.sh 'nvim,~/.tmux/plugins/treemux/configs/treemux_init.lua,,python3,left,40,top,70%,editor,0.5,2,@treemux-refresh-interval-inactive-[0/0]w,0' '%7'' returned 1

Notably, I don't have nvim installed but python3 is present.

plutonium-239 avatar Jul 18 '24 18:07 plutonium-239

Can you install nvim and try again?

kiyoon avatar Jul 19 '24 00:07 kiyoon

That didn't help it either Is there a way I can get a more verbose error?

plutonium-239 avatar Jul 19 '24 04:07 plutonium-239

Can you run the script directly with tmux with the same arguments? I think it will at least say where it went wrong

kiyoon avatar Jul 19 '24 05:07 kiyoon

How do I do that (run a script "directly with tmux")?

If I try to run the script normally in a new window:

⋊> ~/.tmux/plugins/treemux/scripts/toggle.sh 'nvim,~/.tmux/plugins/treemux/configs/treemux_init.lua,,python3,left,40,top,70%,editor,0.5,2,1000,0' 
/home/pu239/.tmux/plugins/treemux/scripts/toggle.sh: line 158: [: tmux_version_int: integer expression expected
source and target panes must be different
no last pane

I substituted @treemux-refresh-interval-inactive-window for 1000 (although I was getting the same error without replacing as well)

plutonium-239 avatar Jul 19 '24 09:07 plutonium-239

I think you forgot the last argument '%7' which is a tmux pane identifier.

What happens with that?

kiyoon avatar Jul 19 '24 11:07 kiyoon

Yeah, you're right, I missed that

Error detected while processing /home/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:
E5113: Error while calling lua chunk: ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: module 'lazy' not found:
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: in main chunk
Error detected while processing command line:
E5108: Error executing lua [string ":lua"]:1: module 'nvim-tree.api' not found:
        no field package.preload['nvim-tree.api']
        no file './nvim-tree/api.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/nvim-tree/api.lua'
        no file '/usr/local/share/lua/5.1/nvim-tree/api.lua'
        no file '/usr/local/share/lua/5.1/nvim-tree/api/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-tree/api.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-tree/api/init.lua'
        no file './nvim-tree/api.so'
        no file '/usr/local/lib/lua/5.1/nvim-tree/api.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-tree/api.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './nvim-tree.so'
        no file '/usr/local/lib/lua/5.1/nvim-tree.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-tree.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

plutonium-239 avatar Jul 19 '24 12:07 plutonium-239

Can you run this command?

nvim -u ~/.tmux/plugins/treemux/configs/treemux_init.lua

The "lazy.nvim" is a package manager, and it should be automatically installed but in your case it doesn't do that. It uses git to clone the github repository, and maybe your git command is somehow locked with password or something like that?

kiyoon avatar Jul 20 '24 08:07 kiyoon

It gives the same error

Error detected while processing /home/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:
E5113: Error while calling lua chunk: ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: module 'lazy' not found:
        no field package.preload['lazy']
        no file './lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy.lua'
        no file '/usr/local/share/lua/5.1/lazy/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
        no file './lazy.so'
        no file '/usr/local/lib/lua/5.1/lazy.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...e/pu239/.tmux/plugins/treemux/configs/treemux_init.lua:56: in main chunk
Press ENTER or type command to continue

git clone on public repos works without a password. Anyways, I'll try to install lazy.nvim and then proceed.

plutonium-239 avatar Jul 20 '24 22:07 plutonium-239