0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

Type 'ThemeModalStyle' is not assignable to type 'Styles'. TS2322 #587

Open SvenMeyer opened 4 years ago

SvenMeyer commented 4 years ago

As suggested during build, I ran a yarn upgrade. Thereafter I got the error:

src/components/account/wallet_weth_balance.tsx
TypeScript error in src/components/account/wallet_weth_balance.tsx(220,25):
Type 'ThemeModalStyle' is not assignable to type 'Styles'.  TS2322

    218 |                         onRequestClose={this.closeModal}
    219 |                         onSubmit={this.handleSubmit}
  > 220 |                         style={theme.modalTheme}
        |                         ^
    221 |                         totalEth={totalEth}
    222 |                         wethBalance={wethBalance}
    223 |                     />
aeslami commented 4 years ago

Same here, didn't do upgrade though, just cloned, npm install and npm start

vm06007 commented 4 years ago

same here, how to fix this?

vm06007 commented 4 years ago

seems you need to make sure not to upgrade to latest react-modal, please use in package.json "react-modal": "3.8.1", strict version and don't do yarn upgrade - then should work, at least worked for me!

hoangld-ibl commented 4 years ago

My solution:

dekz commented 4 years ago

As suggested during build, I ran a yarn upgrade

Can you point to the docs which recommend a yarn upgrade? We have commited a yarn.lock to lock the dependencies to this tested version.

npm install

This project uses yarn as mentioned in the README.

"react-modal": "3.8.1",

I'll pin to this specific version to prevent frustrations of those using npm/yarn upgrade

xumoyan commented 4 years ago

as Styles