Buslowicz / twc

TypeScript based, boilerplate-less, Polymer toolbox friendly Polymer Modules
32 stars 1 forks source link

Cannot run twc #34

Closed tpluscode closed 7 years ago

tpluscode commented 7 years ago

When running twc from console I'm getting the following error.

E:\Piskorz\AppData\Roaming\npm\node_modules\twc\src\index.js:19
const { 1: polymerVersion = 1 } = fs_1.existsSync(bowerJsonPath) ? require(bowerJsonPath)
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (E:\Piskorz\AppData\Roaming\npm\node_modules\twc\src\cli.js:5:17)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

It's the same regardless of passed arguments. I'm using Windows, node 5.5.0, and this happens with cmd and cygwin alike.

Buslowicz commented 7 years ago

TWC uses ES6 features (destructuring in above example) and requires node version that supports that (afaik v6 at least). I will change the tsconfig target to es5 and we will check if everything works fine. If there is anything else that will not work on older node version, I will set the minimal node version.