bowheart / zedux

ATTENTION! This is the old repository. Zedux has moved to https://github.com/omnistac/zedux
https://omnistac.github.io/zedux
MIT License
47 stars 0 forks source link

Todo-MVC example fails #4

Closed cjk closed 6 years ago

cjk commented 6 years ago

Probably a babel- / dependency issue:

[...]
Server running at http://localhost:1234 
🚨  /tmp/test/zedux/examples/todomvc/src/index.js: [BABEL] /tmp/test/zedux/examples/todomvc/src/index.js: Unknown option: /tmp/test/zedux/examples/node_modules/react/index.js.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options. 
[...]
bowheart commented 6 years ago

Interesting. It was working on my localhost until I updated all the dependencies. And then I did get that error.

It looks like the cause of it is that parcel does not include babel-preset-react. I'm almost positive it used to. Otherwise, I have no idea how this was ever working. At any rate, that's a terrible error message. I had to appeal to stackoverflow to figure this out:

https://stackoverflow.com/questions/33739933/webpack-babel-react-build-error-unknown-option-foo-node-modules-react-rea

So I just explicitly installed a couple dependencies. That's pushed on master. Just pull it and run npm install again.

Thanks for bringing this up!

Oh, also you can now cd into any of the examples and just run npm start from that directory. So for todomvc, you can now do either of the following:

cd examples
npm install
npm start -- todomvc

or:

cd examples
npm install
cd todomvc
npm start