After a clean installation of @next (alpha 14) with CRA, @emotion/core and @emotion/styled are not in scope for the project. Importing a component from from @material-ui reveals that the peer dependencies are not installed. @material-ui/styled-engine/index.js relies on emotion.
Using a component from Material-UI should work without having to install additional peer dependencies.
https://codesandbox.io/s/relaxed-dust-99u5t?file=/src/App.js
I understand this may be intentional as I haven't followed too closely to the discussion of what will be the default styling solution in V5. If it is the default, it should probably be moved from a peerDependency to dependency. Otherwise this may just be a temporary inconvenience until it is determined how to select what styling library you would like to use under the hood.
| Tech | Version |
| ----------- | ------- |
| Material-UI | v5.0.0-alpha14 |
| React | v17.0.0 |
Opened a PR resolving this, but there may be a wider discussion about what _should_ be the default when Material-UI is installed in a project that has no other style library already in use.
I think most will agree that it should work, or at the very least the documentation should be updated to reflect that there are additional steps to usage (installing emotion in this case)
@levigunz This is an interesting topic. You can find a thread about this very topic at https://github.com/mui-org/material-ui/pull/22435#discussion_r490782223. We are still not 馃挴 sure that it's the best approach. cc @eps1lon @mnajdova.
@oliviertassinari @mnajdova can we add this discussion to the #22342 initial comment? Make it a little more visible that it is an open question rather than a specific issue? Hopefully it will be a little easier for others to find and we can close this thread.
Most helpful comment
@levigunz This is an interesting topic. You can find a thread about this very topic at https://github.com/mui-org/material-ui/pull/22435#discussion_r490782223. We are still not 馃挴 sure that it's the best approach. cc @eps1lon @mnajdova.