question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, when i try to build this i get this error

Failed to compile.

./components/Navbar/Dropdown.component.tsx:124:15 Type error: Type '{ children: ({ open }: { open: any; }) => Element; as: string; }' is not assignable to type 'IntrinsicAttributes & { theme?: Theme; } & { children?: ReactNode; }'. Property 'as' does not exist on type 'IntrinsicAttributes & { theme?: Theme; } & { children?: ReactNode; }'.

122 | export function Dropdown({ children, items, position }: StandardProps) { 123 | return ( > 124 | <StyledMenu as="div"> | ^ 125 | {({ open }) => ( 126 | <> 127 | <Menu.Button as={Fragment}>{children}</Menu.Button>

Appreciate any help!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
NuroDevcommented, Jun 5, 2022

Thanks for reporting this issue. I’ve come across this error a few times in the past few weeks & am yet to find an exact cause other than some fault with the yarn.lock & the Babel / Emotion dependencies.

I would like to find the true cause of this eventually, but currently I am in the process of moving away from Emotion.css in favour of purely using Windi CSS instead. See #53

0reactions
matiasbiancommented, Jun 23, 2022

i tried to delete node_modules folder and install the dependencies again, but it’s still showing that error. I’ll try to figure out what is happening if you want.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`npm build` doesn't run the script named "build" in package.json
When you're running npm install and npm finds a package that has C/C++ bindings or generally sth that needs node-gyp to run then...
Read more >
I can't run "npm run build" - DigitalOcean
I'm trying to run a simple “npm run build” and it takes a lot of time, and I'm not able to complete the...
Read more >
Can't run NPM RUN BUILD · Issue #3774 · npm/cli - GitHub
I even start Windows 10 in safe mode and run the -, npm run build, but it fails because the files are locked...
Read more >
"Run" and "Build" buttons greyed out? - Apple Developer
I can't run any of my programs (C++), as the run button is greyed out. When I click manage schemes, there are none,...
Read more >
Mac OSX - Can't run or build game on MAC
I can't build or run a game project on MAC.. I even tried to create a new empty project and run it.. but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found