Next.js Discord

Discord Forum

'FC<DropdownMenuProps>' is not a valid JSX element in NEXT 14

Unanswered
American Chinchilla posted this in #help-forum
Open in Discord
American ChinchillaOP
./components/Dropdown.tsx:31:6
Type error: 'DropdownMenu' cannot be used as a JSX component.
  Its type 'FC<DropdownMenuProps>' is not a valid JSX element type.

  29 |   }
  30 |   return (
> 31 |     <DropdownMenu>
     |      ^
  32 |       <DropdownMenuTrigger asChild>
  33 |         <Button variant="outline" className="flex gap-2 my-auto">
  34 |           <Label className="hidden sm:block m-auto">{session.user?.name}</Label>
error: script "build" exited with code 1 (SIGHUP)

7 Replies

American ChinchillaOP
this component comes from https://ui.shadcn.com/
Dunker
Show that component
@Dunker Show that component
American ChinchillaOP
Dunker
.txt file will be better
@Dunker .txt file will be better
American ChinchillaOP
Dunker
looks like you are using shadcn wrong