Running with @material-ui/core": "^3.9.2 throws error above.
Link is being used as per your docs.
import { Link as RouterLink } from 'react-router-dom'
import Link from '@material-ui/core/Link';
Should load the Link component.
Throws the error above when running Webpack 4.
Run Webpack 4 on code above.
| Tech | Version |
|--------------|---------|
| Material-UI | v3.9.2 |
| React | v16.7.0 |
| Browser | mac terminal |
| TypeScript | Visual Studio Code |
| etc. | |
It seems to be working fine with the exact same import syntax in codesandbox. I suspect that your build pipeline causes this issue. Could you provide a full repro? Maybe verify that other components are working?
Well, go figure.
I had the error, then upgraded to 3.9.2 and kept on having it. Now I removed material-ui's Link and replaced with react-router-dom Link. That worked fine.
Following your message I reversed to the docs formula and it now works fine. As you said, there was some issue with the build process that disappeared when I went back and forth.
Thanks
Upgrading Material UIdependencies solved this issue
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.2",
"@material-ui/lab": "^3.0.0-alpha.30",
Most helpful comment
Well, go figure.
I had the error, then upgraded to 3.9.2 and kept on having it. Now I removed material-ui's
Linkand replaced withreact-router-dom Link. That worked fine.Following your message I reversed to the docs formula and it now works fine. As you said, there was some issue with the build process that disappeared when I went back and forth.
Thanks