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

Uncaught ReferenceError: createSvgIcon is not defined error when using TextField and XxxxIcon #25362

Closed
2 tasks done
Mushus opened this issue Mar 14, 2021 · 1 comment
Closed
2 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@Mushus
Copy link

Mushus commented Mar 14, 2021

Thank you for a very nice library!

An error occurred when using the TextField and HouseIcon components.

import React from 'react'
import ReactDOM from 'react-dom'
import HouseIcon from '@material-ui/icons/House'
import TextField from '@material-ui/core/TextField'

// error
ReactDOM.render(
    <div>
        <TextField />
        <HouseIcon />
    </div>,
    document.getElementById('root')
)
  • 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 😯

The following error occurred in the browser when using the TextField component and the Icon component at the same time.

index.js:1 Uncaught ReferenceError: createSvgIcon is not defined
    at Object.createSvgIcon (index.js:1)
    at Object.get [as default] (createSvgIcon.js:9)
    at House.js:16
    at chunk.HLGHNTKK.js?v=460dc5c2:4
    at dep:@material-ui_icons_House:1
createSvgIcon @ index.js:1
get @ createSvgIcon.js:9
(anonymous) @ House.js:16
(anonymous) @ chunk.HLGHNTKK.js?v=460dc5c2:4
(anonymous) @ dep:@material-ui_icons_House:1

Expected Behavior 🤔

The TextField and Icon components are displayed without any errors.

Steps to Reproduce 🕹

Steps:

  1. clone git repository https://github.com/Mushus/mui-error
  2. run yarn
  3. run yarn dev
  4. show "http://localhost:3000" on the any browser

Context 🔦

Your Environment 🌎

  • windows 10 WSL2 (Ubuntu 20.04.2 LTS (Focal Fossa))
  • Google Chrome 88.0.4324.190(Official Build) (64 ビット)
  • Node: 15.11.0
`npx @material-ui/envinfo`
  System:
    OS: Linux 4.19 Ubuntu 20.04.2 LTS (Focal Fossa)
  Binaries:
    Node: 15.11.0 - ~/.nvm/versions/node/v15.11.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v15.11.0/bin/yarn
    npm: 7.6.0 - ~/.nvm/versions/node/v15.11.0/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found

@Mushus Mushus added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 14, 2021
@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 14, 2021
@oliviertassinari
Copy link
Member

Duplicate of #21377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants