yoo2001818 / react-against-humanity

Multiplayer game of Cards Against Humanity using React
MIT License
4 stars 1 forks source link

Probably sking some steps. #27

Closed fabzl closed 7 years ago

fabzl commented 7 years ago

I'm getting an error when I try to run webpack, probably im missing something obvious, please help.

ERROR in ./src/view/room.js Module build failed: SyntaxError: Only one default export allowed per module. (89:0)

87 | }; 88 |

89 | export default connect((state, props) => { | ^ 90 | const { room: { list }, connection: { self, list: connectionList } } = state; 91 | const { params: { roomId } } = props; 92 | const room = list[roomId];

@ ./src/view/routes.js 23:12-29

ERROR in ./src/reducer/common/room.js Module build failed: SyntaxError: Only one default export allowed per module. (103:0)

101 | } 102 |

103 | export default function room(state = { | ^ 104 | // This is used for auto-incrementing. This automatically gets up though, 105 | // However, create action should explicitly set the room id. 106 | last: 1,

yoo2001818 commented 7 years ago

Sorry for being late. This project was an experimental project and it didn't work well - I started this project so I can experiment about using redux on servers, but I abandoned it because it can't hide data due to redux structure, which causes a major problem for a card game because other player's decks are visible from other player's client.

Anyway, I was using buggy Babel 6 at the moment and it needed two export defaults to work. Since that's fixed now, I've removed it. You can just pull it again and call webpack again.

If you still want to run this project, you might need to download card data. Download JSON file from https://github.com/nodanaonlyzuul/against-humanity/raw/master/source/cards.json and drop it as src/db/cards.json.