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

Can't resolve 'react/lib/ReactMount' issue #55

Closed
bairisuresh opened this issue Nov 17, 2016 · 9 comments
Closed

Can't resolve 'react/lib/ReactMount' issue #55

bairisuresh opened this issue Nov 17, 2016 · 9 comments

Comments

@bairisuresh
Copy link

I have installed latest generator-rect-webpack-redux,. after running npm start it is throwing below error.
ERROR in ./src/reducers/index.js
Module not found: Error: Can't resolve 'react/lib/ReactMount' in 'C:\Users\folder11\Desktop\demo\src\reducers'
@ ./src/reducers/index.js 1:307-338

this is repeated for all js files in scr folder...
Can anyonce help me out to resolve this plzz

@stylesuxx
Copy link
Owner

Can you Plesse post mode and npm Version?

Am 17.11.2016 10:07 schrieb "sureshbairi" [email protected]:

I have installed latest generator-rect-webpack-redux,. after running npm
start it is throwing below error.
ERROR in ./src/reducers/index.js
Module not found: Error: Can't resolve 'react/lib/ReactMount' in
'C:\Users\folder11\Desktop\demo\src\reducers'
@ ./src/reducers/index.js 1:307-338

this is repeated for all js files in scr folder...
Can anyonce help me out to resolve this plzz


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#55,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA7tEChjjIbWSCbjWvoa3miDvI9GMBRHks5q_BlmgaJpZM4K1CRG
.

@bairisuresh
Copy link
Author

@stylesuxx
Node -6.5.0
NPM : 3.10.8

@stujo
Copy link

stujo commented Nov 17, 2016

I think I was able to fix this with these changes:

putsch is the name of the app I made with the generator

--- a/client/putsch/.babelrc
+++ b/client/putsch/.babelrc
@@ -1,11 +1,12 @@
 {
   "presets": [
-    "es2015-native-modules",
+    ["es2015", { "modules": false }],
     "react",
     "airbnb"
   ],
   "plugins": [
     "transform-decorators-legacy",
-    "transform-object-rest-spread"
+    "transform-object-rest-spread",
+    "react-hot-loader/babel"
   ]
 }
--- a/client/putsch/conf/webpack/Base.js
+++ b/client/putsch/conf/webpack/Base.js
@@ -166,7 +166,7 @@ class WebpackBaseConfig {
               this.includedPackages,
               [this.srcPathAbsolute]
             ),
-            loaders: ['react-hot', 'babel']
+            loaders: ['babel']
           }
         ]
       },
--- a/client/putsch/package.json
+++ b/client/putsch/package.json
@@ -30,7 +30,6 @@
     "babel-plugin-transform-object-rest-spread": "^6.8.0",
     "babel-polyfill": "^6.9.0",
     "babel-preset-airbnb": "^2.0.0",
-    "babel-preset-es2015-native-modules": "^6.6.0",
     "babel-preset-react": "^6.5.0",
     "chai": "^3.5.0",
     "copyfiles": "^1.0.0",
@@ -59,18 +58,18 @@
     "null-loader": "^0.1.1",
     "phantomjs-prebuilt": "^2.1.7",
     "react-addons-test-utils": "^15.0.1",
-    "react-hot-loader": "^1.3.0",
+    "react-hot-loader": "^3.0.0-beta",
     "rimraf": "^2.5.2",
     "sass-loader": "^3.2.0",
     "sinon": "^1.17.3",
     "style-loader": "^0.13.1",
     "url-loader": "^0.5.7",
-    "webpack": "^2.1.0-beta.6",
-    "webpack-dev-server": "^2.0.0-beta"
+    "webpack": "2.1.0-beta.22",
+    "webpack-dev-server": "2.1.0-beta.2"
   },
   "dependencies": {
-    "react": "^15.0.1",
-    "react-dom": "^15.0.1",
+    "react": "^15.4.0",
+    "react-dom": "^15.4.0",
     "react-redux": "^4.4.6",
     "redux": "^3.6.0"
   }

@stylesuxx
Copy link
Owner

Just checked, rect version is to new, please use 15.3.0 for now:

npm install [email protected]

@bairisuresh
Copy link
Author

bairisuresh commented Nov 18, 2016

Hi @stylesuxx
Previously i have used [email protected] in my project.
Now i have changed it to [email protected] , but getting same error. Please help me to resolve this ASAP.

@creativecoder
Copy link

@bairisuresh These 2 steps worked for me:

  1. Update react-hot-loader to 3.0.0-beta.6
  2. Remove react-hot from loaders in conf/webpack/Base.js

@stylesuxx
Copy link
Owner

This is a problem in the template of the base generator, we are working on it. Please follow @creativecoder 's recommendation.

@bairisuresh
Copy link
Author

@stylesuxx ,
thank you i will continue with the workaround solution for now.

@stylesuxx
Copy link
Owner

Fixed in 1.1.0 - feel free to re-open if problem persists.

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

No branches or pull requests

4 participants