Webpack-encore: SyntaxError: Unexpected token

Created on 16 Jun 2017  路  2Comments  路  Source: symfony/webpack-encore

I tried to follow the instructions on Symfony blog, but I'm getting the following error:

garak@xps:~/sf/garak3$ ./node_modules/.bin/encore dev
Running webpack ...

/home/garak/sf/garak3/node_modules/@symfony/webpack-encore/index.js:140
    enableVersioning(enabled = true) {
                             ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/garak/sf/garak3/webpack.config.js:1:76)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

Most helpful comment

Encore requires Node 6+. What version of Node are you using ?

All 2 comments

Encore requires Node 6+. What version of Node are you using ?

Nailed. I was using v4.2.6.
Thank you

Was this page helpful?
0 / 5 - 0 ratings