Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with babbel 6.5 #97

Open
davetoxa opened this issue Feb 26, 2016 · 4 comments
Open

Not working with babbel 6.5 #97

davetoxa opened this issue Feb 26, 2016 · 4 comments

Comments

@davetoxa
Copy link

Hello :)
I'd tried to upgrade to the latest babbel 6.5.2

And first example not working anymore

SyntaxError: /Users/acherepanov/learnyoureact/views/index.jsx: Unexpected token (5:11)
  3 | export default class TodoBox extends React.Component{
  4 |   render() {
> 5 |     return <div className="todoBox">
    |            ^
  6 |         Hello, world!
  7 |       </div>
  8 |   }
    at Parser.pp.raise (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:1425:13)
    at Parser.pp.unexpected (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:2905:8)
    at Parser.pp.parseExprAtom (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:754:12)
    at Parser.pp.parseExprSubscripts (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:509:19)
    at Parser.pp.parseMaybeUnary (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:489:19)
    at Parser.pp.parseExprOps (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:420:19)
    at Parser.pp.parseMaybeConditional (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:402:19)
    at Parser.pp.parseMaybeAssign (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:365:19)
    at Parser.pp.parseExpression (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:329:19)
    at Parser.pp.parseReturnStatement (/Users/acherepanov/learnyoureact/node_modules/babylon/index.js:2106:26)
SyntaxError: /Users/acherepanov/learnyoureact/views/index.jsx: Unexpected token (5:11)

Dependencies:

├── [email protected]  extraneous
├── [email protected]  extraneous
├── [email protected]  extraneous
├── [email protected]  extraneous
├── [email protected]  extraneous
└── [email protected]  extraneous
@kohei-takata
Copy link
Collaborator

Hello @davetoxa :)
Thanks for your reporting issue.
Now, learnyoureact is not supporting Babel v6.
But I think it's good for users to use later version of libraries.
I'll update learnyoureact for using Babel v6.
And Pull Requests are always welcome.
If you update learnyoureact, I'll merge :)

@davetoxa
Copy link
Author

@kohei-takata I'am newbie at babel, es6, es7, so can't do it =(

@kohei-takata
Copy link
Collaborator

@davetoxa
OK, I'll update! Thanks!

@tttimur
Copy link

tttimur commented Aug 5, 2016

require('babel-core/register')({ presets: ['es2015', 'react'] });

instead of babel/register

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

No branches or pull requests

3 participants