Material-ui: Module not found: Can't resolve 'material-ui/RadioButton'

Created on 25 Nov 2017  路  10Comments  路  Source: mui-org/material-ui

I believe installer does not include all components. I have tried many components but none of them exists. I have even checked subfolders of material-ui.

  • no RadioButton
  • no AutoComplete

There are more. How can we install them? I have tried each of following and none of them is working...

npm i -S material-ui
npm i -S material-ui@next
npm i -S material-ui@release

My versions:
"material-ui": "^1.0.0-beta.21",
"react": "^16.1.1",

discussion

Most helpful comment

Well this issue is not solved but closed...

All 10 comments

This is how i have innstalled it. I am not soing anything wrong. What i am doing is following their instructions:
https://material-ui-next.com/getting-started/installation/

Following instructions at https://material-ui-next.com/guides/migration-v0.x I have fixed it using:
npm install material-ui@latest
npm install material-ui-next@latest

And now of course another problem:
TypeError: Cannot read property 'prepareStyles' of undefined

Have you properly finished all the steps of the guide?
You do not mention going through step 2 and 3.

  1. Run the migration helper on your project.
  2. After that, you are free to migrate one component instance at the time.

What i did is just used npm commands i have written in my previous post. So I could install. I can import. But the problem occurs once i try to use it. I am getting this error.

Most of documentations are lack of explanation. I see that migration helper also have problem.
jscodeshift -t

What exactly do i need to run here?

Let's say i am trying to use
import AutoComplete from 'material-ui/AutoComplete';

How can i do the migration?

@Dumanix I suggest you to browse the documentation of v1.
there is no RadioButton on the V1 branch check this, see https://material-ui-next.com/demos/selection-controls/#radio-buttons

There is directly no Autocomplete, but you could build one with third parties library, see https://material-ui-next.com/demos/autocomplete/

It looks like there is?

import Radio, { RadioGroup } from 'material-ui/Radio';

Also they advertise like they have AutoComplete

Well this issue is not solved but closed...

The redux-form tutorials still, as of Apr 2019, reference the old names related to RadioButton. If you landed here by a google search for the missing function names: it appears the logic still exists in @material-ui (not _material-ui_), but the redux-form tutorial still needs to be updated to the current names in material-ui version 0.20.2+.

Reference: redux-form 7.3.0 example.

https://redux-form.com/8.1.0/examples/material-ui/ uses the namespaced packages. The only issue is the codesandbox.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

revskill10 picture revskill10  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments

newoga picture newoga  路  3Comments

rbozan picture rbozan  路  3Comments

mb-copart picture mb-copart  路  3Comments