mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

@mui/x-date-pickers doesn't provide react-dom

Open himself65 opened this issue 3 years ago β€’ 0 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

➜ yarn
➀ YN0000: β”Œ Resolution step
➀ YN0002: β”‚ @mui/x-date-pickers@npm:5.0.0-beta.4 [9c94f] doesn't provide react-dom (p7da8f), requested by react-transition-group

Expected behavior πŸ€”

No warnings

Steps to reproduce πŸ•Ή

Link to live example:

Steps:

  1. yarn add @mui/x-date-pickers

Context πŸ”¦

No response

Your environment 🌎

npx @mui/envinfo
 npx @mui/envinfo
Need to install the following packages:
  @mui/[email protected]
Ok to proceed? (y) y

  System:
    OS: macOS 12.5
  Binaries:
    Node: 18.7.0 - ~/.nvm/versions/node/v18.7.0/bin/node
    Yarn: 3.2.1 - ~/.nvm/versions/node/v18.7.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v18.7.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Edge: Not Found
    Firefox: 103.0.1
    Safari: 15.6
  npmPackages:
    @emotion/react: ^11.10.0 => 11.10.0 
    @emotion/styled: ^11.10.0 => 11.10.0 
    @mui/base:  5.0.0-alpha.92 
    @mui/icons-material: ^5.8.4 => 5.8.4 
    @mui/lab: ^5.0.0-alpha.93 => 5.0.0-alpha.93 
    @mui/material: ^5.9.3 => 5.9.3 
    @mui/private-theming:  5.9.3 
    @mui/styled-engine:  5.8.7 
    @mui/system: ^5.9.3 => 5.9.3 
    @mui/types:  7.1.5 
    @mui/utils:  5.9.3 
    @mui/x-date-pickers: ^5.0.0-beta.3 => 5.0.0-beta.4 
    @types/react: ^18.0.15 => 18.0.15 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^4.7.4 => 4.7.4 

Order ID πŸ’³ (optional)

No response

himself65 avatar Aug 09 '22 21:08 himself65

I runed yarn add @mui/[email protected] and did not get any message error. Could you share the package.json before you get the error, and the command lined you runed to get it?

alexfauquette avatar Aug 10 '22 13:08 alexfauquette

Hey @Himself65 Thanks for opening the issue! I guess you're using Yarn 2, right?

It looks like pickers packages are missing peer dependency of "react-dom": https://github.com/mui/mui-x/blob/a86f76124165c9f200f9e8d9276590170ff8395a/packages/x-date-pickers/package.json#L60-L70

For data grid, it was added in https://github.com/mui/mui-x/pull/5121

cherniavskii avatar Aug 10 '22 16:08 cherniavskii

I runed yarn add @mui/[email protected] and did not get any message error. Could you share the package.json before you get the error, and the command lined you runed to get it?

Could u please use yarn 3.2.1? I think yarn 1 won’t emit warning for that

himself65 avatar Aug 10 '22 17:08 himself65