Export default doesn't exist in target module
Unanswered
Asian black bear posted this in #help-forum
Asian black bearOP
The export default was not found in module [project]/node_modules/swr/dist/index/react-server.mjs [app-rsc] (ecmascript) <exports>.
Did you mean to import unstable_serialize?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
Did you mean to import unstable_serialize?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
import useSWR from "swr";
const { data, error, isLoading } = useSWR("/api", fetcher);
if (error) return <div>failed to load</div>;
if (isLoading) return <div>loading...</div>;