CrocoDillon / universal-react-redux-boilerplate

Step by step creation of a Universal React + Redux Boilerplate
Other
176 stars 33 forks source link

error: Error('locals[0] does not appear to be a `module` object with Hot Module ' + 'replacement API enabled #1

Closed JonArnfred closed 8 years ago

JonArnfred commented 8 years ago

Ran npm install and npm run dev, I get the following error:

/Users/User/Desktop/universal-react-redux-boilerplate-master/node_modules/react-transform-hmr/lib/index.js:51 throw new Error('locals[0] does not appear to be a module object with Hot Module ' + 'replacement API enabled. You should disable react-transform-hmr in ' + 'production by using env section in Babel configuration. See the ' + 'example in README: https://github.com/gaearon/react-transform-hmr'); ^

Error: locals[0] does not appear to be a module object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using env section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr at proxyReactComponents (/Users/User/Desktop/universal-react-redux-boilerplate-master/node_modules/react-transform-hmr/lib/index.js:51:11)

Some more info: npm ERR! Darwin 14.5.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev" npm ERR! node v5.2.0 npm ERR! npm v3.3.12 npm ERR! code ELIFECYCLE npm ERR! universal-react-redux-boilerplate@1.0.0 dev: ./bin/server npm ERR! Exit status 1

CrocoDillon commented 8 years ago

I can confirm this happens to me as well when I do a fresh clone... I'm sorry.

I don't have time to look at this right now but will do so as soon as possible.

CrocoDillon commented 8 years ago

Okay I guess I just forgot that in order for this boilerplate to work, this PR needs to be merged: babel/babel#3168 (and of course babel needs to release an update afterwards, which also takes some time)

I guess I can make a patch to make it work anyway. Will do when I get home.

JonArnfred commented 8 years ago

Ah, great. Looking forward to see server-side rendering and hot module replacement coexist in a boilerplate that is not that huge :-)

CrocoDillon commented 8 years ago

Should be fixed now, let me know if it works (and if it doesn't)! :)

JonArnfred commented 8 years ago

It does work indeed.

CrocoDillon commented 8 years ago

Awesome! :tada: