Next.js Discord

Discord Forum

TypeError: __webpack_require__.n is not a function

Unanswered
Dovekie posted this in #help-forum
Open in Discord
DovekieOP
I have a server component that looks like this:

let data = [ //fake data obj for now ]
export const targetColumns: ColumnDef<UserInformation>[] = [
    {
        accessorKey: "score",
        header: "score",
        cell: async (cellData) => {
            "use server"

            return <div className="text-right font-medium"></div>
        },
    },
    {
        accessorKey: "mutualAspects",
        header: "Mutual Aspects"
    }
]

export default async function Targets() {
    return (
        <div className="container mx-auto py-10">
            <DataTable columns={targetColumns} data={data} />
        </div>
    )
}


And it gives me the error I mentioned in the title.

When I comment out "cell" things work fine.

I"m just trying to implement a table following this tutorial: https://ui.shadcn.com/docs/components/data-table#column-definitions

0 Replies