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

fix: add @mui/system as dependency #1973

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

benschell-okta
Copy link
Contributor

Description

https://oktainc.atlassian.net/browse/OKTA-647925

Currently, pulling in @okta/odyssey-react-mui/labs in a Yarn PnP-enabled repo yields a big error.

✘ [ERROR] Could not resolve "@mui/system"

    ../../../.yarn/__virtual__/@mui-x-date-pickers-virtual-ca0180142b/0/cache/@mui-x-date-pickers-npm-5.0.20-b84c386d15-c8537e6c0c.zip/node_modules/@mui/x-date-pickers/MonthPicker/MonthPicker.js:7:25:
      7 │ import { useTheme } from '@mui/system';
        ╵                          ~~~~~~~~~~~~~

  The Yarn Plug'n'Play manifest says this package has a peer dependency on "@mui/system", but the
  package "@mui/system" has not been installed:

    ../../../.pnp.cjs:4301:28:
      4301 │             ["@mui/system", null],\
           ╵                             ~~~~

  You can mark the path "@mui/system" as external to exclude it from the bundle, which will remove
  this error.

@mui/x-date-pickers has @mui/system as a peerDependency, but nothing here is properly pulling that dependency in.

Copy link
Contributor

@KevinGhadyani-Okta KevinGhadyani-Okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great solution for our current problem. We can examine optionalDependencies later to see if that's better.

@benschell-okta benschell-okta merged commit afc8f55 into main Sep 14, 2023
@benschell-okta benschell-okta deleted the bs-OKTA-647925-fix-missing-dependency branch September 14, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants