I had this happen in my vitest jsdom environment when I was trying to return null; in an error case prior to returning the JSX. I guess thats not allowed..
return null;