question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createSvgIcon and useId import errors

See original GitHub issue

I’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:

  1. Download dependencies: npm install @material-ui/lcore @material-ui/lab
  2. Open VSCode to Create File: Snackbar.js with customized snackbar component from the Material-UI Docs.
  3. Import File: import CustomizedSnackbars from './Snackbar' in PartnerProfile.js
  4. 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

15reactions
nicktran29commented, Apr 14, 2020

npm update to get the below combination. It works!

"@material-ui/core": "^4.9.10",
"@material-ui/lab": "^4.0.0-alpha.49",
10reactions
4levelscommented, Apr 12, 2020

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:

    "@material-ui/core": "^4.9.10",
    "@material-ui/icons": "^4.5.1",
    "@material-ui/lab": "^4.0.0-alpha.49",

Got it resolved by removing node_modules and package-lock.json

🤷

Kind regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

createSvgIcon and useId import errors · Issue #20482 - GitHub
I'm attempting to use the Customized snackbar component from the Material-UI Docs. I'm copying the example code for the component given in ...
Read more >
javascript - material-ui 'createSvgIcon' is not exported from ...
js Attempted import error: 'createSvgIcon' is not exported from '@material-ui/core/utils'. So I tried to google this problem and found another ...
Read more >
module not found: error: can't resolve '@mui/icons-material' in ...
Import form for MUI version 5. Observe warnings in the console. Expected behavior. No warnings. Actual behavior. I use rjsf as follows with...
Read more >
export 'default' imported as was not found in ... - YouTube
export 'default' imported as was not found in components possible exports default error fixed react. 10K views 10 months ago.
Read more >
React Icon Component - Material UI - MUI
To import the icon component with a theme other than the default, append the ... The createSvgIcon utility component is used to create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found