Material-ui: error: bundling failed: Error: Unable to resolve module `react-dom`

Created on 26 Feb 2018  路  4Comments  路  Source: mui-org/material-ui

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Want to use Components without error

Current Behavior

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.

Steps to Reproduce (for bugs)

  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 -- --reset-cache.
  4. Remove haste cache: rm -rf $TMPDIR/haste-map-react-native-packager-*.

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | ^0.20.0 |
| React | 16.2.0 |
| React-Native | 0.52.2 |

v0.x

Most helpful comment

imilar error with another

run " npm install react-dom " worked for me

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sys13 picture sys13  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

reflog picture reflog  路  3Comments

ghost picture ghost  路  3Comments