exception when navigating to another page. The stack trace is useless (see in separate comment). The navigation is performed by a <button>, it is trivial, nothing extra happens there:
<button onClick={() => navigate(...)} ...
<button onClick={() => navigate(...)} ...
Do you have any recommendation how to find the root of the error? Thanks.