Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Trying to import Material-UI Button into .mdx file #1123

Closed
jmschmidt opened this issue Sep 24, 2019 · 2 comments
Closed

Trying to import Material-UI Button into .mdx file #1123

jmschmidt opened this issue Sep 24, 2019 · 2 comments

Comments

@jmschmidt
Copy link

I am trying to import Material-UI's button component into button.mdx and it fails to compile due to a missing dependency. Loading the Material-UI button into the React app works as expected though. I believe there is some kind of dependency conflict .

button.mdx

---
name: Button
menu: Atoms
---
import Button from '@material-ui/core/Button';

<Button variant="contained">
    Default
</Button>

This is the error returned during compile:

These dependencies were not found:
⠀
* dom-helpers/addClass in ../node_modules/react-transition-group/esm/CSSTransition.js
* dom-helpers/removeClass in ../node_modules/react-transition-group/esm/CSSTransition.js

App was created using create-react-app.
Docz Version: ^2.0.0-rc.41

@truecolintracy
Copy link

This looks to be a duplicate issue that has a conversation going on here: #1102

@jmschmidt
Copy link
Author

I was able to get this working using this solution from @barbalex.
I updated my package.json to include:
"resolutions": { "react-transition-group": "4.0.0" }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants