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

[ListItemButton] Missing export from @material-ui/core/index.js #26660

Closed
2 tasks
mwskwong opened this issue Jun 9, 2021 · 10 comments · Fixed by #26667
Closed
2 tasks

[ListItemButton] Missing export from @material-ui/core/index.js #26660

mwskwong opened this issue Jun 9, 2021 · 10 comments · Fixed by #26667
Assignees
Labels
bug 🐛 Something doesn't work component: list This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material

Comments

@mwskwong
Copy link
Contributor

mwskwong commented Jun 9, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

ListItemButton is not exported from @material-ui/core/index.js, i.e. import { ListItemButton } from "@material-ui/core" will not work.

Expected Behavior 🤔

import { ListItemButton } from "@material-ui/core" should returns no error.

Steps to Reproduce 🕹

Steps:

  1. import { ListItemButton } from "@material-ui/core"

Context 🔦

Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: Windows 10 10.0.18363
  Binaries:
    Node: 14.17.0 - C:\Program Files\nodejs\node.EXE       
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.14.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 91.0.4472.77
    Edge: Spartan (44.18362.449.0)
  npmPackages:
    @emotion/react: ^11.4.0 => 11.4.0
    @emotion/styled: ^11.3.0 => 11.3.0
    @material-ui/core: ^5.0.0-alpha.36 => 5.0.0-alpha.36
    @material-ui/data-grid: ^4.0.0-alpha.30 => 4.0.0-alpha.30
    @material-ui/icons: ^5.0.0-alpha.36 => 5.0.0-alpha.36
    @material-ui/private-theming:  5.0.0-alpha.35
    @material-ui/styled-engine:  5.0.0-alpha.34
    @material-ui/styles: ^4.11.4 => 4.11.4
    @material-ui/system:  5.0.0-alpha.36
    @material-ui/types:  6.0.1
    @material-ui/unstyled:  5.0.0-alpha.35
    @material-ui/utils:  5.0.0-alpha.35
    @types/react:  17.0.9
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
@mwskwong mwskwong added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 9, 2021
@mwskwong mwskwong changed the title [ListItemButton] Missing import in index.js [ListItemButton] Missing export in @material-ui/core/index.js Jun 9, 2021
@mwskwong mwskwong changed the title [ListItemButton] Missing export in @material-ui/core/index.js [ListItemButton] Missing export from @material-ui/core/index.js Jun 9, 2021
@eps1lon
Copy link
Member

eps1lon commented Jun 9, 2021

Thanks for the report.

We need to re-export the component from packages/material-ui/src/index.js and packages/material-ui/src/index.d.ts just like we do with the other components.

@eps1lon eps1lon added bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process. package: material-ui Specific to @mui/material and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 9, 2021
@chadmuro
Copy link
Contributor

chadmuro commented Jun 9, 2021

Hi, this is my first time contributing. Can I take this?

@eps1lon
Copy link
Member

eps1lon commented Jun 9, 2021

Hi, this is my first time contributing. Can I take this?

Sure, go ahead. If you have any questions feel free to ask. If you're stuck you can always propose an unfinished changed and we'll work through it together.

@eps1lon eps1lon removed the good first issue Great for first contributions. Enable to learn the contribution process. label Jun 9, 2021
@eps1lon eps1lon assigned eps1lon and chadmuro and unassigned eps1lon Jun 9, 2021
@oliviertassinari oliviertassinari added the component: list This is the name of the generic UI component, not the React module! label Jun 9, 2021
@siriwatknp
Copy link
Member

Until the PR is merged and released (should be fixed in the next release), anyone who experienced this error can use this as workaround.

import ListItemButton from '@material-ui/core/ListItemButton';

@resparis
Copy link

Hi, I tried to import but it is failing
import ListItemButton from '@material-ui/core/ListItemButton';

`Failed to compile.

./src/components/MyList.js
Module not found: Can't resolve '@material-ui/core/ListItemButton'`

Part of my package.json

"dependencies": { "@material-ui/core": "^4.11.4", "@material-ui/icons": "^4.11.2",

@mwskwong
Copy link
Contributor Author

mwskwong commented Jun 18, 2021

Hi, I tried to import but it is failing
import ListItemButton from '@material-ui/core/ListItemButton';

`Failed to compile.

./src/components/MyList.js
Module not found: Can't resolve '@material-ui/core/ListItemButton'`

Part of my package.json

"dependencies": { "@material-ui/core": "^4.11.4", "@material-ui/icons": "^4.11.2",

This component only exists in v5.

@neltex
Copy link

neltex commented Dec 10, 2021

Try using import ListItemButton from '@mui/material/ListItemButton';

@mwskwong
Copy link
Contributor Author

mwskwong commented Dec 11, 2021

Try using import ListItemButton from '@mui/material/ListItemButton';

Dude... what are you trying to suggest? This bug only appears in @material-ui/core@5.0.0-alpha.36 and has been fixed already.

And @mui/material doesn't even exist at that point

@RanjithaSN
Copy link

still ListItemButton is not found in the material ui version "@material-ui/core": "^4.12.3",.. is the fix available in any other version?

@mwskwong
Copy link
Contributor Author

mwskwong commented Feb 9, 2022

still ListItemButton is not found in the material ui version "@material-ui/core": "^4.12.3",.. is the fix available in any other version?
ListItemButton doesn't exist on v4. The latest version is v5 and the package has been renamed to @muimaterial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: list This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants