I got this error while using nano in Windows Terminal, with GIT-bash.
$ nano .bashrc
Error in /etc/nanorc on line 237: Error expanding /usr/share/nano/*.nanorc: No such file or directory
run this command from git bash (as admin)
dos2unix /usr/share/nano/git.nanorc
It fixes line breaks, which are different in Linux and Windows.
from : https://www.scivision.dev/git-for-windows-nano-error-fix/