There are many possible reasons you might be getting an Internal Server Error:
....other errors due to the specificity of the modules you imported
I am not exactly sure of the answer, I hope the above tips head you in the right direction. Please provide as many details as possible.
A good practice in your case when facing such a bug is to decouple all the things you are trying to use all at once and test them individually. This will help you find where your code went wrong.
Some tips to gain visibility:
const linkData = await nav.navLinks();
const moviesData = await api.fetchAllMovies();
outside of the individual routes. You can get the linkData and moviesData in the app. That way your /* routes only have to return html. Only one purpose that you can test and validate that it's not the source of the problem.
Use the same fetchMovies and fetchAllMovies and navlinks in your app and in your tests. If they are different, that might be the reason one way it's running ok and the other it's failing.
Separate your logic functions from your routes and test them one by one by logging in the app what they get.
Test your render function without the logic with test html
Make sure 'Content-Type', /html/ is correct
Change to different modules that do the same thing for you, see what error you get.
Please get back to me at any stage with more information. I would be happy to help further.
Best