yetone / avante.nvim

Use your Neovim like using Cursor AI IDE!
Apache License 2.0
5.07k stars 173 forks source link

bug: still getting missing avante_templates #544

Closed tobenwarrior closed 1 week ago

tobenwarrior commented 1 week ago

Describe the bug

i have updated to the latest version and followed all the previous reports with this issue but I am still getting it. Screenshot 2024-09-05 172047

To reproduce

i get this issue when i ask a question and press enter. not when opening avante

Expected behavior

No response

Environment

lazy vim

sica07 commented 1 week ago

I have the same problem. I've checked the build folder and avante_templates.so and avante_tokenizers.so are present. I'm on linux (arch linux) and I'm using packer for package installations

andrew-t-james-core commented 1 week ago

Had some luck in (Lazyvim) completely uninstalling and cleaning up plugin. Reinstalled works now.

sqr commented 1 week ago

I added build = "make" to my config file and was still getting the error.

Moved the config out of the directory, cleaned up lazyvim like suggested above, quit, moved the config back in, restarted and it was working fine again.

aarnphm commented 1 week ago

check if you have set version=false. chances are the lazy-lock still lock to a version that is not main

lucas-Nicolas commented 1 week ago

I'm getting the same bug on macos with LazyVim even when tryign to clean and move the plugin back in. I have also tried manually making in the install directory but I get the same message.

The exact same config works perfectly fine on a WSL machine.

Solved for me: had to manually rm -rf the avante directory rather than just deleting from LazyVim and then build from source (took around a min on my old laptop)

therod commented 1 week ago

Had the same problem on macos. Following these steps solved the issue for me:

  1. Made sure avante builds from source using thebuild = "make BUILD_FROM_SOURCE=true" option.
  2. Removed the avante.nvim directory under ~/.local/share/nvim/lazy/avante.nvim and re-installing solved the issue.
  3. Re-installed and now it works.
tobenwarrior commented 1 week ago

tried all the above still cant work I think there is a problem with the make file not able to run (I have make installed) ![Uploading Screenshot 2024-09-06 230522.png…]()

dmaspataud commented 1 week ago

I had the same issue, what fixed it for me was to

snowphone commented 1 week ago

I guess for vim-plug users, Plug 'snowphone/avante.nvim', { 'branch': 'main', 'do': { -> avante#build('source=true') } } should be used by default.

tobenwarrior commented 1 week ago

manual build isnt working i have all the files I tried :Lazy sync as well Screenshot 2024-09-07 030229 Screenshot 2024-09-07 030340 back to this error again

sebassdc commented 1 week ago

I had the same issue, what fixed it for me was to

  • Delete ~/.local/share/nvim/lazy/avante.nvim
  • Start nvim, :Lazy + sync
  • Build manually:
cd ~/.local/share/nvim/lazy/avante.nvim
make
  • Restart nvim, and retry

This did the trick for me in mac with Lazy

tobenwarrior commented 1 week ago

i dont know how but i just randomly tried the solutions above and somehow it worked thanks guys!

imcquee commented 1 week ago

Still running into this despite trying the above multiple times. MacOS,

avante_templates.dylib avante_tokenizers.dylib

Are in my build folder. Same setup in linux works fine with .so

Also on intel mac, could very well be the reason

EDIT

I apologize, building from source does indeed work on intel mac. If anyone else struggles with the above, instead of running make just run

make BUILD_FROM_SOURCE=true

and it should build properly. Fans might go to 50000rpm but it should work

tkreuder commented 1 day ago

Still running into this despite trying the above multiple times. MacOS,

avante_templates.dylib avante_tokenizers.dylib

Are in my build folder. Same setup in linux works fine with .so

Also on intel mac, could very well be the reason

EDIT

I apologize, building from source does indeed work on intel mac. If anyone else struggles with the above, instead of running make just run

make BUILD_FROM_SOURCE=true

and it should build properly. Fans might go to 50000rpm but it should work

Thanks a lot for your hint!

I had to install rust to get rid of:

make BUILD_FROM_SOURCE=true

cargo build --release --features=luajit -p avante-tokenizers
make: cargo: No such file or directory
make: *** [luajit-tokenizers] Error 1

via: brew install rust which includes cargo.

then i got this:

make BUILD_FROM_SOURCE=true


cargo build --release --features=luajit -p avante-tokenizers
    Updating crates.io index
    Updating git repository `https://github.com/mlua-rs/mlua.git`
error: failed to get `mlua` as a dependency of package `avante-templates v0.1.0 (/Users/torbenkreuder/.local/share/nvim/lazy/avante.nvim/crates/avante-templates)`

Caused by:
  failed to load source for dependency `mlua`

Caused by:
  Unable to update https://github.com/mlua-rs/mlua.git?branch=main#1634c43f

Caused by:
  failed to clone into: /Users/torbenkreuder/.cargo/git/db/mlua-7a97be9956039e84

Caused by:
  failed to authenticate when downloading repository: git@github.com:mlua-rs/mlua.git

  * attempted ssh-agent authentication, but no usernames succeeded: `git`

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  no authentication methods succeeded
make: *** [luajit-tokenizers] Error 101

which i could solve with creating: ~/.cargo/config.toml and the following content:


[net]
git-fetch-with-cli = true