#Prerender error:

1 messages · Page 1 of 1 (latest)

native merlinBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

hearty perch
#

Anyone

restive jungle
restive jungle
# hearty perch

Okay now try to find packageName word in your app directory cuz its coming from there

hearty perch
#

there is no packageName anywhere but in .next

restive jungle
#

Hmm, is local npm run build giving same error

hearty perch
#

yes except it keeps alternating between the file with the error

#

like sometimes it says prerendering page "/marketing"

restive jungle
hearty perch
#
"use client";

import Image from "next/image";
import { useUser } from "@clerk/clerk-react";
import { Button } from "@/components/ui/button";
import { PlusCircle } from "lucide-react";
import { useMutation } from "convex/react";
import { api } from "@/convex/_generated/api"; 
import { toast } from "sonner";
import { useRouter } from "next/navigation";


export default function DocumentsPage () {
    const router = useRouter();
    const { user } = useUser();
    const create = useMutation(api.documents.create);

    const onCreate = () => {
        const promise = create({ title: "Untitled"})
        .then((documentId) => router.push(`/documents/${documentId}`));
        toast.promise(promise, {
            loading: "Creating a new Note",
            success: "New note created",
            error: "Failed to create new note"
        })
    }

    return ( 
        <div className="h-full flex flex-col items-center justify-center space-y-4">
            <Image 
                src="/empty.png"
                height="300"
                width="300"
                alt="empty"
                className="dark:hidden"
            />
            <Image 
                src="/empty-dark.png"
                height="300"
                width="300"
                alt="empty"
                className="hidden dark:block"
            />
            <h2 className="text-lg font-medium">
                Welcome to {user?.firstName}&apos;s Motion
            </h2>
            <Button onClick={onCreate}>
                <PlusCircle className="h-4 w-4 mr-2"/>
                Create a Note
            </Button>
        </div>
     );
}
#

this is the app/(main)/(routes)/documents/page.tsx

restive jungle
hearty perch
#

how can I do that

restive jungle
hearty perch
#

k one sec

restive jungle
#