Want to use Components without error
I am try to use SelectField, but i am get error like this:
error: bundling failed: Error: Unable to resolve module `react-dom` from[26/392]
blint/www/react-native/AirbinderB2B/node_modules/material-ui/MenuItem/MenuItem.j
s`: Module does not exist in the module map
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset Metro Bundler cache: `rm -rf $TMPDIR/react-*` or `npm start -- --rese
t-cache`. 4. Remove haste cache: `rm -rf $TMPDIR/haste-map-react-native-package
r-*`.
at UnableToResolveError (/home/blint/www/react-native/AirbinderB2B/node_modu
les/metro/src/node-haste/DependencyGraph/ModuleResolution.js:772:5)
at ModuleResolver.resolveDependency (/home/blint/www/react-native/AirbinderB
2B/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:311:171
9)
at ResolutionRequest.resolveDependency (/home/blint/www/react-native/Airbind
erB2B/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:96:
16)
at DependencyGraph.resolveDependency (/home/blint/www/react-native/Airbinder
B2B/node_modules/metro/src/node-haste/DependencyGraph.js:269:4352)
at /home/blint/www/react-native/AirbinderB2B/node_modules/metro/src/DeltaBun
dler/traverseDependencies.js:201:36
at next (native)
at step (/home/blint/www/react-native/AirbinderB2B/node_modules/metro/src/De
ltaBundler/traverseDependencies.js:256:306)
at /home/blint/www/react-native/AirbinderB2B/node_modules/metro/src/DeltaBun
dler/traverseDependencies.js:256:536
at /home/blint/www/react-native/AirbinderB2B/node_modules/metro/src/DeltaBun
dler/traverseDependencies.js:256:217
at addDependency (/home/blint/www/react-native/AirbinderB2B/node_modules/met
ro/src/DeltaBundler/traverseDependencies.js:256:92)
at /home/blint/www/react-native/AirbinderB2B/node_modules/metro/src/DeltaBun
dler/traverseDependencies.js:237:9
BUNDLE [android, dev] ./index.js 鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻戔枒鈻戔枒鈻戔枒鈻戔枒 54.0% (604/822), failed.
watchman watch-del-all.node_modules folder: rm -rf node_modules && npm install.rm -rf $TMPDIR/react-* or npm start -- --reset-cache. rm -rf $TMPDIR/haste-map-react-native-packager-*.| Tech | Version |
|--------------|---------|
| Material-UI | ^0.20.0 |
| React | 16.2.0 |
| React-Native | 0.52.2 |
imilar error with another
run " npm install react-dom " worked for me
@blackinitial We have been porting the component on the v1-beta branch. We have reimplemented it from the ground-up.
We encourage people starting with Material-UI to go with v1-beta. The master branch is in a low maintenance mode. We don't plan any work on it. However, we still do our best to review and merge pull requests that fix bugs on this branch.
@oliviertassinari - Where did SelectField go in the new V1 of Matieral-ui. I too was looking to use the SelectField and get the same error as the OP. Is there a replacement in V1? It seems like maybe some of the menu components, but I am not sure.
@ProfessionalAmateur https://material-ui.com/demos/selects/.
Most helpful comment
imilar error with another
run " npm install react-dom " worked for me