React-starter-kit: SyntaxError: Unexpected token ...

Created on 18 Apr 2016  路  5Comments  路  Source: kriasoft/react-starter-kit

Followed the instructions, I'm getting:

$ npm start

> @ start /Users/pierre/Code/MyApp
> babel-node tools/run start

/Users/pierre/Code/MyApp/tools/start.js:37
            plugins: [...(x.query ? x.query.plugins : []), ['react-transform', {
                      ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at loader (/Users/pierre/Code/MyApp/node_modules/babel-register/lib/node.js:126:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/pierre/Code/MyApp/node_modules/babel-register/lib/node.js:136:7)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (run.js:31:18)
    at Module._compile (module.js:435:26)

Most helpful comment

@pierrenel @jaylaw81 just update node.js to v5 or change this line from "node5" to "es2015"

All 5 comments

It seems like Babel doesn't pickup settings from package.json#L101-114. Do you have .babelrc file in the root of your project, if so, it may override settings from package.json

I have the same issue. This was occurring after a direct clone / install from the repository.

@pierrenel @jaylaw81 just update node.js to v5 or change this line from "node5" to "es2015"

What @frenzzy said :) Feel free to reopen if it doesn't fix the issue.

@frenzzy you saved me! many thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jeff-Kook picture Jeff-Kook  路  3Comments

rochadt picture rochadt  路  3Comments

Bogdaan picture Bogdaan  路  3Comments

artkynet picture artkynet  路  4Comments

satyavrat picture satyavrat  路  3Comments