nuro.dev icon indicating copy to clipboard operation
nuro.dev copied to clipboard

Cant run build

Open ghost opened this issue 2 years ago • 5 comments

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!

ghost avatar May 24 '22 15:05 ghost

Same here

matiasbian avatar Jun 04 '22 21:06 matiasbian

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

NuroDev avatar Jun 05 '22 13:06 NuroDev

On the last merge, the error when i try to build is:

Type error: Type '(options?: void | Options) => void | Transformer<Root, Root>' is not assignable to type 'Plugin<[Settings?], Settings>'.
  Type 'void | Transformer<Root, Root>' is not assignable to type 'void | Transformer'.
    Type 'Transformer<Root, Root>' is not assignable to type 'void | Transformer'.
      Type 'Transformer<Root, Root>' is not assignable to type 'Transformer'.
        Types of parameters 'file' and 'file' are incompatible.
          Type 'VFile' is missing the following properties from type 'VFile': value, stored, result, map

  59 | 		scope: data,
  60 | 		mdxOptions: {
> 61 | 			rehypePlugins: [[RehypeAutolinkHeadings, {}]],
     | 			                 ^
  62 | 			remarkPlugins: [RemarkCodeTitles, RemarkEmoji, RemarkPrism, RemarkSlug],
  63 | 		},
  64 | 	});

matiasbian avatar Jun 22 '22 13:06 matiasbian

I have tried but I am unable to reproduce this locally, no is CD showing this issue.

Are you able to re-install your node_modules to verify it's not a outdated dependency issue?

NuroDev avatar Jun 23 '22 14:06 NuroDev

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.

matiasbian avatar Jun 23 '22 14:06 matiasbian