aave / interface

An open source interface for the decentralized liquidity protocol Aave
https://app.aave.com
Other
397 stars 340 forks source link

Facing compilation issues with mui and type/react versions for local dev #1939

Closed SwineCoder101 closed 6 months ago

SwineCoder101 commented 7 months ago

Hi, I faced a few minor issues with the aave interface, the latest packages threw a few compilation errors. I have a fix branch but unable to push as I don't have the permissions. Could we make the following changes so we are able to launch locally?

Yarn requires node version v18 and above but for some reason .nvmrc is on version 16 and the docs says to use this version aswell as yarn.

I was unable to start the aave interface locally due to a bug with "@types/react", i downgraded to "18.0.1" https://github.com/vercel/next.js/issues/36085

experimental_sx is no longer supported in mui, I updated to the latest version and had to alter the components slightly for using the themes

    "@mui/icons-material": "^5.15.7",
    "@mui/lab": "^5.0.0-alpha.163",
    "@mui/material": "^5.15.7",

example change in src/components/ContentWithTooltip.tsx

export const PopperComponent = styled(Popper)(({ theme }) =>
  theme.unstable_sx({
    '.MuiTooltip-tooltip': {
      color: 'text.primary',
      backgroundColor: 'background.paper',
      p: 0,
      borderRadius: '6px',
      boxShadow: '0px 0px 2px rgba(0, 0, 0, 0.2), 0px 2px 10px rgba(0, 0, 0, 0.1)',
      maxWidth: '280px',
    },
    '.MuiTooltip-arrow': {
      color: 'background.paper',
      '&:before': {
        boxShadow: '0px 0px 2px rgba(0, 0, 0, 0.2), 0px 2px 10px rgba(0, 0, 0, 0.1)',
      },
    },
  })
);
grothem commented 6 months ago

@SwineCoder101 v16 should be correct. I'm not able to reproduce the type errors.

We've got some upgrades in progress though that will be bumping dependency versions, so I'll close this for now