Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error due to missing dependency #43575

Closed
Methuselah96 opened this issue Sep 2, 2024 · 3 comments · Fixed by #43584
Closed

Type error due to missing dependency #43575

Methuselah96 opened this issue Sep 2, 2024 · 3 comments · Fixed by #43584
Assignees
Labels
bug 🐛 Something doesn't work regression A bug, but worse typescript

Comments

@Methuselah96
Copy link
Contributor

Methuselah96 commented Sep 2, 2024

Steps to reproduce

Steps:

  1. Start a TypeScript project with @mui/material using a strict package manager (e.g., pnpm or Yarn PnP) and with skipLibCheck set to false

Current behavior

Type error:

./node_modules/@mui/material/utils/memoTheme.d.ts:1:34 - error TS2307: Cannot find module '@mui/styled-engine' or its corresponding type declarations.

1 import { CSSInterpolation } from '@mui/styled-engine';
                                   ~~~~~~~~~~~~~~~~~~~~

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

Thanks for the easy migration to MUI v6, it has gone much smoother than previous upgrades! ❤️ I'm excited to try out the experimental CSS extraction, the performance of the current styling is a big pain point for us.

Your environment

npx @mui/envinfo
"@mui/material": "^6.0.1"

Search keywords: type error missing dependency

@Methuselah96 Methuselah96 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 2, 2024
@DiegoAndai DiegoAndai self-assigned this Sep 2, 2024
@mnajdova mnajdova assigned mnajdova and unassigned DiegoAndai Sep 3, 2024
@mnajdova
Copy link
Member

mnajdova commented Sep 3, 2024

We should've imported that from the @mui/system. I am creating a PR.

@mnajdova
Copy link
Member

mnajdova commented Sep 3, 2024

Thanks for the easy migration to MUI v6, it has gone much smoother than previous upgrades! ❤️ I'm excited to try out the experimental CSS extraction, the performance of the current styling is a big point for us.

So glad to hear this! :)

@mnajdova mnajdova added typescript regression A bug, but worse and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 3, 2024
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @Methuselah96! How was your experience with our support team?
If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

@DiegoAndai DiegoAndai moved this to Done in Material UI Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work regression A bug, but worse typescript
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants