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 Core ^6.0.0 - Unexpected token import #882

Closed
mantovanig opened this issue Aug 15, 2016 · 2 comments
Closed

Babel Core ^6.0.0 - Unexpected token import #882

mantovanig opened this issue Aug 15, 2016 · 2 comments

Comments

@mantovanig
Copy link

mantovanig commented Aug 15, 2016

With new major version of Babel Core the gulpfile.babel.js return this error:

/Users/mantovanig/Documents/lab/pwa_test/gulpfile.babel.js:27
import path from 'path';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at loader (/Users/mantovanig/Documents/lab/pwa_test/node_modules/babel-register/lib/node.js:148:5)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)

To fix this read this issue on gulp.

@mantovanig mantovanig changed the title Babel Core ^6.0.0 Babel Core ^6.0.0 - Unexpected token import Aug 15, 2016
@dmitrika
Copy link

dmitrika commented Nov 13, 2016

Faced the same problem.

Added in WSK root dir .babelrc with:

{
  "presets": ["es2015"]
}

and babel-preset-es2015 as dev-dep.

Is that a right move, to add this to the origin repo?

gregorydickson added a commit to gregorydickson/web-starter-kit that referenced this issue Apr 12, 2017
@gauntface
Copy link

🐛 Bankruptcy: Closing due to inactivity.

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