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 · 19 comments
Closed

Error when install nvchad with my own custom #166

holiq opened this issue Mar 13, 2023 · 19 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 git@github.com:NvChad/NvChad.git ~/.config/nvim
git clone git@github.com: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 git@github.com: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 git@github.com: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

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

5 participants
@holiq @ayushgupta0010 @Jor-ban @siduck and others