saleor / saleor-storefront

A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
https://demo.saleor.io/
BSD 3-Clause "New" or "Revised" License
769 stars 672 forks source link

compile error #1092

Open kulame opened 3 years ago

kulame commented 3 years ago

What I'm trying to achieve

i found compile error when i try to build

Steps to reproduce the problem

  1. yarn build

What I expected to happen

… build success

Screenshots

➜  saleor-storefront git:(master) ✗ yarn build
yarn run v1.22.11
$ next build
warn  - React 17.0.1 or newer will be required to leverage all of the upcoming features in Next.js 11. Read more: https://nextjs.org/docs/messages/react-version
info  - Loaded env from /srv/demo/saleor-platform/saleor-storefront/.env.production
info  - Loaded env from /srv/demo/saleor-platform/saleor-storefront/.env
info  - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5
Failed to compile.

./src/@next/components/atoms/Button/styles.ts:58:26
Type error: Type of property 'defaultProps' circularly references itself in mapped type 'Pick<ForwardRefExoticComponent<Pick<Pick<any, Exclude<keyof ReactDefaultizedProps<StyledComponentInnerComponent<WithC>, ComponentPropsWithRef<StyledComponentInnerComponent<WithC>>>, StyledComponentInnerAttrs<...> | ... 1 more ... | StyledComponentInnerAttrs<...>> | Exclude<...> | Exclude<...> | Exclude<...>> & Parti...'.

  56 | `;
  57 |
> 58 | export const Secondary = styled(Primary)`
     |                          ^
  59 |   box-shadow: inset 0px 0px 0px 3px
  60 |     ${props => props.theme.button.colors.secondary.color};
  61 |   border-left: 1px solid ${props => props.theme.button.colors.secondary.color};
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

System information Operating system: Browser: