Then your first mistake was posting in the forum section for IDE 2.0. It has been moved to a more appropriate section
That aside, you do not explain what a "Jetson Nano" is or how it is used with an Arduino Mega
What sketch are you compiling and when/where do you see the error message ? If that is not the full error message then please post the full one, using code tags when you do