Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run PackerSync after upgrade to 2.6.5 #1294

Closed
zalech opened this issue Nov 12, 2022 · 44 comments
Closed

can't run PackerSync after upgrade to 2.6.5 #1294

zalech opened this issue Nov 12, 2022 · 44 comments
Labels
question Further information is requested

Comments

@zalech
Copy link

zalech commented Nov 12, 2022

Question

I can't run :PackerSync after the last update.

SOLUTION #1294 (comment)

Windows Solution #1294 (comment)

@zalech zalech added the question Further information is requested label Nov 12, 2022
@sjava
Copy link

sjava commented Nov 12, 2022

me too

@mehalter
Copy link
Member

Dang, I was worried about this 🤔 let me test the upgrade path. This came because I figured out how to lazy load Packer, I thought that I had fixed it to handle the migration but let me investigate it today! Sorry for the upgrade issue :/

@mehalter mehalter added bug Something isn't working and removed question Further information is requested labels Nov 12, 2022
@mehalter mehalter changed the title can't run PackerSync can't run PackerSync after upgrade to 2.6.5 Nov 12, 2022
@matteo-hertel
Copy link

This happened to me when upgrading to 2.6.0, so is not necessarily 2.6.5 😄
a temporary solution that worked for me is to revert locally 00a703c96ecbb1ae3c8483fdc9919898a214fa06 and
00a703c
if you figure out a fix for this and you need people to test it, please hit me up

@mehalter
Copy link
Member

@matteo-hertel could you try pulling the latest (v2.6.5) and then delete your packer_compiled.lua file? It should be like

rm ~/.local/share/nvim/packer_compiled.lua

And then open AstroNvim and see if it resolves it?

@juxuanu
Copy link

juxuanu commented Nov 12, 2022

Doing that

Failed to load core.bootstrap

.../site/pack/packer/start/impatient.nvim/lua/impatient.lua:100: Could not hash /home/icar/.local/share/nvim/packer_compiled.l

Now it opens default nvim. :-(

@MenacingPerson
Copy link

Removing ~/.local/share/nvim worked

@mehalter
Copy link
Member

Ah could you also delete the cache folder and see if that helps?

rm -rf ~/.cache/nvim

@juxuanu
Copy link

juxuanu commented Nov 12, 2022

Removing ~/.local/share/nvim worked

That worked.

@mehalter
Copy link
Member

Yeah doing a full refresh would definitely work, was hoping to have a solution here that didn't require having to repull all the plugins and language servers that people behave installed.

@mehalter mehalter added question Further information is requested and removed bug Something isn't working labels Nov 12, 2022
@matteo-hertel
Copy link

pulled the latest (25ef6a)

ran

rm ~/.local/share/nvim/packer_compiled.lua
rm -rf ~/.cache/nvim

Packer is back but after a packerSync I get an error

.config/nvim/lua/user/init.lua:145: module 'telescope.actions' not found

running rm -rf ~/.local/share/nvim and then running PackerSync has the same output, still an error for telescope

@MenacingPerson
Copy link

That's your user config conflicting

@zbroniszewski
Copy link
Contributor

Is this expected to be an issue for anybody that upgraded to 2.6.5?

@mehalter
Copy link
Member

I think so @zbroniszewski . Did you have this issue? Im Going to make an announcement about it across all the socials

@mehalter
Copy link
Member

mehalter commented Nov 12, 2022

Just to summarize for anyone that runs into this:

This is the easiest way to resolve the new lazy loaded packer migration without having to reinstall plugins or anything (Preferred method):

rm ~/.local/share/nvim/packer_compiled.lua
rm -rf ~/.cache/nvim

To be extra safe, you can also do a full refresh (Last resort):

rm -rf ~/.local/site/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.cache/nvim

After each of these, restart AstroNvim and run :PackerSync.

Sorry again for this inconvenience! This shouldn't happen again since we won't be moving packer again. 😞

@mehalter mehalter pinned this issue Nov 12, 2022
@mehalter
Copy link
Member

I have also gone ahead and pinned this issue so that it remains visible for people who go to the repo to ask this question. I'll make a post on Discord and r/AstroNvim just to be safe as well.

@zbroniszewski
Copy link
Contributor

@mehalter I have not upgraded to 2.6.5 quite yet. Is there any way to avoid this issue for somebody who is preparing to upgrade?

@Mjb141
Copy link

Mjb141 commented Nov 12, 2022

@zbroniszewski Just don't remove Packer. When asked hit n.

@mehalter
Copy link
Member

@zbroniszewski @Mjb141 after you say no one time it will have the recompiled packer. On the endt startup it will ask you again to remove the packer installed to the start plugin folder. You should say yes the second time because it will have recompiled at that point the new lazy loading. So it should work

@zbroniszewski
Copy link
Contributor

Thanks @mehalter I will test this carefully and report back. If successful, perhaps we should consider another announcement for users who have not yet upgraded to 2.6.5. (Rather than allowing 2.6.5 to break things, then fix, in case there are other unknown side effects)

@mehalter
Copy link
Member

Yeah that would be great @zbroniszewski let me know how your testing goes. Thanks so much for the help and investigation !

@mehalter mehalter mentioned this issue Nov 12, 2022
4 tasks
@keturiosakys
Copy link

Even after this refresh I can't seem to get PackerSync to work :( I ran the full refresh (deleting share/nvim and cache/nvim) folders but after restarting nvim I get a whole bunch of errors and Packer fails to start. Of the errors, this seems to be the most relevant one:

Error in packer_compiled: ~/.config/nvim/lua/packer_compiled.lua:653: Vim(packadd):E919: Directory not found in 'packpath': "pack/*/opt/mason-lspconfig.nvim"

@keturiosakys
Copy link

Oh hold on I got it working now.

  1. Reinstalled AstroNvim.
  2. Re-added my personal config to user folder
  3. Removed the .local/share/nvim (that included packer_compiled.lua), .cache/nvim etc
  4. Reran Nvim and then PackerSync command became available

@benvds
Copy link

benvds commented Nov 13, 2022

This worked for me neither, I had to revert back to v.2.6.4

@mehalter
Copy link
Member

@benvds can you please share more details

@alexandersix
Copy link

alexandersix commented Nov 13, 2022

Hi @mehalter, this may be me not understanding fully, but I have completely removed AstroNvim from my system, removed packer_compiled.lua, removed .local/share/nvim, and re-installed AstroNvim using the directions on the website, and I am still getting the Not an editor command: PackerSync error.

All I've achieved by doing this is reverting entirely back to the default install of Neovim. Any ideas where to go from here?

EDIT
I went and reinstalled Packer from their repo and things seem to be back to normal even though the first thing that AstroNvim does when running the initial PackerSync is remove Packer.

@mehalter
Copy link
Member

@alexandersix once you have compiled and verified that the new code is in the packer_compiled.lua you will want to remove the packer installation in the pack/start folder because our stuff installs packer to the opt folder and will lazy load it.

@alexandersix
Copy link

@mehalter Where can I find the pack/start folder? AstroNvim is working again with the defaults, but if I try to add my user config that I've been using, everything breaks with a Failed to load core.bootstrap error because it couldn't hash the packer_compiled.lua file

@mehalter
Copy link
Member

@alexandersix that error would be happening because you didn't clear your Neovim cache. Please make sure to follow the steps I laid out above :)

@alexandersix
Copy link

@mehalter Strange, I cleared it all out and followed those steps prior to needing to re-install packer (those steps are what caused me to not be able to to run Packer until I re-installed it). Not sure why those steps didn't work the first time, but all seems to be well over here this time.

@anupj
Copy link

anupj commented Nov 15, 2022

I followed the recommended solution steps and it worked for me.
Thanks again for your work on Astronvim @mehalter 👍

@daniel-hampton
Copy link

I ran into the same difficult as @alexandersix after following the recommended approach from @mehalter. After reading the later message from @mehalter that I should say "No" to the first time it asks me if I want to remove packer from the 'start' folder, my second attempt worked. I was able to say yes to removing it on the second prompt after it recompiled and looks like everything is working. Thanks for the information in this thread and your work on this software. 👍

@benvds
Copy link

benvds commented Nov 25, 2022

i also got things working again by clearing all:

rm -rfd ~/.config/nvim/lua/packer_compiled.lua; rm -rfd ~/.local/share/nvim ; rm -rfd ~/.cache/nvim/;

and then doing a clean checkout

@talksik
Copy link

talksik commented Nov 30, 2022

same issue with all of the tips

@chhh
Copy link

chhh commented Dec 1, 2022

Error detected while processing command line:
492: Not an editor command: PackerSync

@maxdevjs
Copy link

maxdevjs commented Dec 5, 2022

This project is so cool 😊😍🚀

P.S.: perhaps a well noticeable, temporary, note/walk-through to solve this (or future) kind of 😱 issues could be provided in the README 😀

@Rafael-Conde
Copy link

Rafael-Conde commented Dec 6, 2022

The original solution comment

Just to summarize for anyone that runs into this:

This is the easiest way to resolve the new lazy loaded packer migration without having to reinstall plugins or anything (Preferred method):

rm ~/.local/share/nvim/packer_compiled.lua
rm -rf ~/.cache/nvim

To be extra safe, you can also do a full refresh (Last resort):

rm -rf ~/.local/site/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.cache/nvim

After each of these, restart AstroNvim and run :PackerSync.

Sorry again for this inconvenience! This shouldn't happen again since we won't be moving packer again. 😞

The windows paths are:

C:\Users\%user%\.cache\nvim
C:\Users\%user%\AppData\Local\nvim-data\packer_compiled.lua
C:\Users\%user%\AppData\Local\nvim-data\pack

One can delete them by sticking a del before the path on cmd.

del C:\Users\%user%\.cache\nvim
del C:\Users\%user%\AppData\Local\nvim-data\packer_compiled.lua
del C:\Users\%user%\AppData\Local\nvim-data\pack

@mehalter
Copy link
Member

mehalter commented Dec 7, 2022

Thanks for this @Rafael-Conde ! I'll also link it at the top!

@Rafael-Conde
Copy link

It's a pleasure to be of help @mehalter !!! Let me know if there is anything else I could do!!

@convers39
Copy link

convers39 commented Dec 13, 2022

I keep facing this issue after updating to the latest 2.9.1 even when I tried to remove all related folders and reinstall. At last, I just follow the error message so I install packer manually:

git clone --depth 1 https://github.com/wbthomason/packer.nvim\
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim

Then open AstroNvim again, and it worked. Now just enter 'y' when it asked to remove the packer installation.

@mehalter
Copy link
Member

@convers39 no worries, you can say yes there and remove the packer installed in the start folder

@wtanksleyjr
Copy link

Hey, this is my first time trying nvim, I was recommended this ... but apparently this issue's got me anyhow, even though I don't think I'm upgrading or anything. (Maybe in a previous life I tried Packer before uninstalling nvim?)

Is there some even more extreme "kill everything" set of commands I can run (ha ha "sudo rm /") to just not deal with this at all? Given that none of the commands so far posted help at all?

@wtanksleyjr
Copy link

Hey, this is my first time trying nvim, I was recommended this ... but apparently this issue's got me anyhow

SOLVED. It wasn't related to this problem. The problem was I was using Ubuntu's neovim, which is old. Removed that, installed from nvim's official recent deb, and BOOM everything worked.

Responding in case someone else has the same problem :) .

@mehalter mehalter unpinned this issue Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests