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

Babel 6 expects user to specify es2015 preset #3

Open
brickaa opened this issue Dec 17, 2015 · 4 comments
Open

Babel 6 expects user to specify es2015 preset #3

brickaa opened this issue Dec 17, 2015 · 4 comments

Comments

@brickaa
Copy link

brickaa commented Dec 17, 2015

Hey, I was following your tutorial and on step 3 about object destructuring, I kept getting an unexpected token error from the line let {monthlyPayment, monthlyRate} = calculateMonthlyPayment(principal, years, rate);

Figured out that Babel 6 wasn't transpiling es2015 by default. Fixed it by adding a .babelrc file, reference:

{
  "presets": ["es2015"]
}

Thanks for making this, it's been helpful.

@jerrylau91
Copy link

use babel --preset es2015 ... instead

@codepandy
Copy link

codepandy commented Aug 26, 2016

Hi, I was following your tutorial ,but there wasn't any file in the build directory,and I don't know what mean the es2015,is it a folder's name?

"scripts": {
"babel": "babel --presets es2015 js/main.js -o build/main.bundle.js",
"start": "http-server -p 9000"
},

@duongan
Copy link

duongan commented May 7, 2017

@codepandy you should create a directory and name it "build"

@codepandy
Copy link

@duongan ok,thank you.

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

4 participants