Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

example doesn't compile #6

Open
toyg opened this issue Apr 18, 2019 · 0 comments
Open

example doesn't compile #6

toyg opened this issue Apr 18, 2019 · 0 comments

Comments

@toyg
Copy link

toyg commented Apr 18, 2019

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?

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

No branches or pull requests

1 participant