I am trying to run the universal starter kit (V2), however when I try and add a server component to the next app I am getting an error that starts with the following:
Server Error
Error: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
defaultLocale
As. understand it this is because there is something in the screen I am creating that probably uses a client side hook.
The server page is as follows:
import {VStack} from "@/components/ui/vstack";
import {Text} from "@/components/ui/text";
const Page = () => {
return (
<VStack className="m-2" space="xl">
<Text>Hello</Text>
</VStack>
);
};
export default Page;
Can any explain how I can get RSC to work within this kit?