OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Type "{ onClick: any; children: any; }" is not valid

  • Thread starter Thread starter Mariano Cerdá
  • Start date Start date
M

Mariano Cerdá

Guest
Im trying to deploy a NextJS app in github pages, and it fails at building giving the following error:

Code:
Failed to compile.

app/components/Button/page.tsx
Type error: Page "app/components/Button/page.tsx" has an invalid "default" export:
  Type "{ onClick: any; children: any; }" is not valid.

This is my button

Code:
const StylizedButton = ({ onClick, children }) => {
  return (
    <StyledButton onClick={onClick}>
      {children}
    </StyledButton>
  );
};

export default StylizedButton;

this is my first time deploying in github and I dont have much experience
<p>Im trying to deploy a NextJS app in github pages, and it fails at building giving the following error:</p>
<pre><code>Failed to compile.

app/components/Button/page.tsx
Type error: Page "app/components/Button/page.tsx" has an invalid "default" export:
Type "{ onClick: any; children: any; }" is not valid.
</code></pre>
<p>This is my button</p>
<pre><code>const StylizedButton = ({ onClick, children }) => {
return (
<StyledButton onClick={onClick}>
{children}
</StyledButton>
);
};

export default StylizedButton;
</code></pre>
<p>this is my first time deploying in github and I dont have much experience</p>
Continue reading...
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top