Open Methuselah96 opened 1 month ago
Strange, Material UI import memoTheme
from @mui/system
(which is a direct dependency), not @mui/styled-engine
, even though the @mui/system
reexports it from @mui/styled-engine
.
https://github.com/mui/material-ui/blob/master/packages/mui-material/src/utils/memoTheme.ts#L1
Ah, it's the memoTheme.d.ts
after the build:
import { Theme } from '../styles/createTheme';
declare const memoTheme: (styleFn: (props: {
theme: Theme;
}) => import("@mui/styled-engine").CSSInterpolation) => (props: {
theme: Theme;
}) => string | number | boolean | import("@mui/styled-engine").ComponentSelector | import("@mui/styled-engine").Keyframes | import("@mui/styled-engine").SerializedStyles | import("@mui/styled-engine").CSSObject | import("@mui/styled-engine").ArrayCSSInterpolation | null;
export default memoTheme;
Search keywords
type error missing dependency
Latest version
Steps to reproduce
Steps:
@mui/material
using a strict package manager (e.g., pnpm or Yarn PnP) and withskipLibCheck
set tofalse
Current behavior
Type error:
This is caused by the fact that
@mui/material
references@mui/styled-engine
, but does not have a dependency on it.Expected behavior
No type error
Context
N/A
Your environment
``` "@mui/material": "^6.1.3" ```npx @mui/envinfo