Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module react-dom #508

Closed
rodineijf opened this issue Dec 19, 2018 · 3 comments
Closed

Cannot find module react-dom #508

rodineijf opened this issue Dec 19, 2018 · 3 comments

Comments

@rodineijf
Copy link

Current Behavior

Steps to reproduce:

react-native init MyProject
yarn add --dev haul
yarn haul init
yarn haul start --platform ios

ERROR
./node_modules/haul/node_modules/react-hot-loader/dist/react-hot-loader.development.js
Module not found: Error: Can't resolve 'react-dom' in '/Users/rfagundes/Workspace/rn/haulApp/node_modules/haul/node_modules/react-hot-loader/dist'

Haul Configuration (webpack.haul.js)

Supposed to be haul.config.js?

import { createWebpackConfig } from "haul";

export default {
  webpack: createWebpackConfig(({ platform }) => ({
    entry: `./index.js`
  }))
};

Your Environment

software version
Haul 1.0.0-rc.10
react-native 0.57.8
node 10.14.2
npm or yarn yarn 1.12.3
@luigiplr
Copy link

Looks like react-hot-loader has imported "react-dom" since 4.5.0 I fixed this locally by installing version 4.4.0.

yarn add react-hot-loader@4.4.0
#OR
npm install react-hot-loader@4.4.0

@rodineijf
Copy link
Author

Thanks @luigiplr

I fixed installing react-hot-loader and react-dom as dependencies.

@sonalpaghadal
Copy link

@rodineijf Thanks. Your solution works.
Can you please explain, why react-hot-loader depends on "react-dom" for React Native projects? Would it works when we release a build with it?

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

No branches or pull requests

3 participants