minimal-react-starter icon indicating copy to clipboard operation
minimal-react-starter copied to clipboard

example doesn't compile

Open toyg opened this issue 6 years ago • 0 comments

Out of the box, node server.js or npm run compile error out like this:

ERROR in ./Counter.js
Module build failed (from ../node_modules/babel-loader/lib/index.js):
SyntaxError: Unexpected token (16:6)

  14 |   render() {
  15 |     return (
> 16 |       <button
     |       ^
  17 |         onClick={() => {
  18 |           this.setState({ count: this.state.count + 1 });
  19 |         }}

 @ ./main.js 3:0-32 6:38-45
 @ multi ./main.js

Is this expected, or a sign that something in the installation has gone wrong?

toyg avatar Apr 18 '19 12:04 toyg