Current section: Client Components 27 exercises
Problem

Module Resolution

Transcript

00:00 At this point, we've actually broken our UI entirely. If you go to the main page right here, everything seems to work, but if you try to navigate to one of the specific ships, then it totally blows up on us and it gives us this error attempted to load a client module outside the hosted route. Now, the interesting thing here is that this

00:19 actually was thrown on the server side, but React sticks that error in our RSC payload so that we can see it on the client, which is interesting. If we go over to our client logs, then we'll see that error attempted to load a client module outside the hosted route. What does that even mean?

00:38 What this means is we don't have a hosted route. We haven't configured one yet. We don't know where to resolve these module locations, like where did these modules come from? We need to configure that both in our render to pipeable stream as well as

00:56 on the client side with create from fetch, how to resolve these modules. Once we have that done, then we'll be able to serialize client components in the RSC payload, and then on the client side in the browser, we'll be able to take those modules and resolve them to

01:13 the proper server endpoint for getting those modules. That is your job in this exercise, just actually two small changes to make all of this work. Let's go.