createSvgIcon and useId import errors
See original GitHub issueI’m attempting to use the Customized snackbar component from the Material-UI Docs.
I’m copying the example code for the component given in the docs into a separate Snackbar.js file and then attempting to import the component into the PartnerProfile.js page within my web app.
- 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 😯
I keep getting a failed to compile error:
./node_modules/@material-ui/lab/esm/internal/svg-icons/SuccessOutlined.js Attempted import error: 'createSvgIcon' is not exported from '@material-ui/core/utils'.
Expected Behavior 🤔
I should be able just import the Snackbar.js file and display it in the PartnerProfile.js
Steps to Reproduce 🕹
The component works in the codesandbox but for some reason is not working in my app. https://codesandbox.io/s/reverent-stonebraker-bst6f?fontsize=14&hidenavigation=1&theme=dark
Steps:
- Download dependencies:
npm install @material-ui/lcore @material-ui/lab
- Open VSCode to Create File: Snackbar.js with customized snackbar component from the Material-UI Docs.
- Import File:
import CustomizedSnackbars from './Snackbar'
in PartnerProfile.js - Display Component:
<CustomizedSnackbars />
Context 🔦
I’m trying to use this component to provide feedback to users on form submissions.
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.9.9 |
React | v16.13.1 |
Browser | Chrome |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (1 by maintainers)
Top GitHub Comments
npm update
to get the below combination. It works!Hi all,
Just ran into the same issue when following the documentation on the Autocomplete helper No peer dependency warning, ran
npm update
, issue still exists. Auto generated deps from package.json:Got it resolved by removing
node_modules
andpackage-lock.json
🤷
Kind regards