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

Error when install nvchad with my own custom #166

Closed
holiq opened this issue Mar 13, 2023 · 23 comments
Closed

Error when install nvchad with my own custom #166

holiq opened this issue Mar 13, 2023 · 23 comments

Comments

@holiq
Copy link

holiq commented Mar 13, 2023

If i have new install nvchad without custom, and run nvim it will ask me
Do you want to install chadrc template? (y/n) :
Now, if i reinstall it with my custom and run nvim, it will be error like this:

Error detected while processing /data/data/com.termux/files/home/.config/nvim/init.lua:
E5113: Error while calling lua chunk: cannot open /data/data/com.termux/files/home/.cach
e/nvim/nvchad/base46/defaults: No such file or directory
stack traceback:
        [C]: in function 'dofile'                                                               /data/data/com.termux/files/home/.config/nvim/init.lua:22: in main chunk
Press ENTER or type command to continue

Then the alternative way is reinstall nvchad and run nvim, if asked Do you want to install chadrc template? (y/n) : answer n and wait until steps completed, after that remove the custom directory and install your own custom

@siduck
Copy link
Member

siduck commented Mar 16, 2023

hi @holiq i tried to reproduce the issue but couldnt https://0x0.st/H-bE.mp4, Can you try again?

@siduck
Copy link
Member

siduck commented Mar 16, 2023

delete old nvim dirs before installation btw ( .local/share/nvim and .cache/nvim )

@holiq
Copy link
Author

holiq commented Mar 16, 2023

hi @holiq i tried to reproduce the issue but couldnt https://0x0.st/H-bE.mp4, Can you try again?

After cloning the nvchad, first you have to clone your custom and then run nvim

The order is as below

git clone [email protected]:NvChad/NvChad.git ~/.config/nvim
git clone [email protected]:your/custom.git ~/.config/nvim/lua/custom
nvim

@holiq
Copy link
Author

holiq commented Mar 16, 2023

XRecorder_16032023_092834.mp4

@ayushgupta0010
Copy link

Hi @siduck. I am facing the same issue. But I didn't clone my custom configs. I deleted all old nvim folders and installed NvChad with the chadrc template, and everything worked fine. But when I opened it just now, I get the same error.

@siduck
Copy link
Member

siduck commented Mar 16, 2023

@ayushgupta0010 @holiq i suppose this is a one time error and that too during installation right?

@holiq
Copy link
Author

holiq commented Mar 17, 2023

@siduck yeah you right

@holiq
Copy link
Author

holiq commented Mar 17, 2023

The solution I found is like bellow

git clone [email protected]:NvChad/NvChad.git ~/.config/nvim
nvim
# Do you want to install chadrc template? (y/n) : n
# wait until process finished
cd ~/.config/nvim/lua
rm -fr custom # remove the default custom
# install your own custom 
git clone [email protected]:your/custom.git custom 
nvim

@siduck
Copy link
Member

siduck commented Mar 17, 2023

this sounds more like a hack to me, i'll try to fix this today

@ayushgupta0010
Copy link

@ayushgupta0010 @holiq i suppose this is a one time error and that too during installation right?

I don't think this error occurs only during installation because I installed NvChad two days ago and have been using it since. But when I opened it earlier today, the error suddenly popped up.

@siduck
Copy link
Member

siduck commented Mar 17, 2023

@ayushgupta0010 @holiq i suppose this is a one time error and that too during installation right?

I don't think this error occurs only during installation because I installed NvChad two days ago and have been using it since. But when I opened it earlier today, the error suddenly popped up.

this will happen when there's no base46 cache on your system, you probable cleared .cache

@ayushgupta0010
Copy link

I am not sure which .cache you are talking about because I use Windows.

@siduck
Copy link
Member

siduck commented Mar 17, 2023

I am not sure which .cache you are talking about because I use Windows.

run lua print(vim.fn.stdpath "cache") in command mode and it'll show a path, check it

@ayushgupta0010
Copy link

I see. It points to the temp folder. So the issue is that you are using the temp folder for caching, and when the user deletes that folder (which the user at some point would clear storage), everything goes haywire. I think by simply using a different folder like the nvim itself, the issue can be resolved.

siduck added a commit to NvChad/NvChad that referenced this issue Mar 26, 2023
@siduck
Copy link
Member

siduck commented Mar 26, 2023

hi @holiq i think the issue should be fixed now

@holiq
Copy link
Author

holiq commented Mar 26, 2023

hi @holiq i think the issue should be fixed now

I'll check it

@holiq
Copy link
Author

holiq commented Mar 26, 2023

Nice @siduck it's work now, thank you mate!

Vealcoo pushed a commit to Vealcoo/NvChad that referenced this issue Apr 21, 2023
camfrey pushed a commit to camfrey/NvFrey that referenced this issue Jun 23, 2023
@Jor-ban
Copy link

Jor-ban commented Oct 20, 2023

I've had similar error in Windows, removing nvim-data folder in AppData/Local/ and re-installing NvChad in nvim folder helped

@TheColorman
Copy link

What is the logic for creating the directories in ~/.local/share/nvim? I've been struggling to figure out when it decides to create missing directories. If I delete the ~/.local/share/nvim folder, I sometimes get an error, and other times it chooses to create the directory.
I also get inconsistent results with ~/.local/share/nvim/bas46, sometimes it will contain lua/themes, sometimes it will not, and I can't figure out why. Reinstalling plugins to force lazy.nvim's build setup spec to run also doesn't seem to work.

Is there a way I can just force base46 to create the relevant directories and themes?

@siduck
Copy link
Member

siduck commented Nov 6, 2024

What is the logic for creating the directories in ~/.local/share/nvim? I've been struggling to figure out when it decides to create missing directories. If I delete the ~/.local/share/nvim folder, I sometimes get an error, and other times it chooses to create the directory. I also get inconsistent results with ~/.local/share/nvim/bas46, sometimes it will contain lua/themes, sometimes it will not, and I can't figure out why. Reinstalling plugins to force lazy.nvim's build setup spec to run also doesn't seem to work.

Is there a way I can just force base46 to create the relevant directories and themes?

what issue do you face now

@TheColorman
Copy link

TheColorman commented Nov 6, 2024

what issue do you face now

"E484: Can't open file /home/color/.local/share/nvim/lazy/base46/lua/base46/themes". The contents of ~/.local/share/nvim/lazy is empty.
I think I'm misunderstanding how the files in ~/.local get created.
If I delete ~/.local/share/nvim it gets recreated when lazy re-installs plugins, but ~/.local/share/nvim/lazy does not get populated.

I should also mention that I'm using a non-standard installation of NvChad that may contribute to my issues. I'm manually installing every plugin from https://github.com/NvChad/NvChad/blob/v2.5/lua/nvchad/plugins/init.lua into my list of lazy plugins in my own config.

@siduck
Copy link
Member

siduck commented Nov 6, 2024

then thats your config issue.. cant help with it. I made a video on yt showing how ui/base46 works outside of nvchad

@TheColorman
Copy link

I was afraid so. I've just practically copied the NvChad init line for line, so I was just confused why I suddenly had issues. I'll check out the video, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@TheColorman @holiq @ayushgupta0010 @Jor-ban @siduck and others