gql-generator icon indicating copy to clipboard operation
gql-generator copied to clipboard

SyntaxError: Unexpected token ...

Open ravensnowbird opened this issue 6 years ago • 2 comments

Unable to run

npm install gql-generator -g

Response

/usr/lib/node_modules/gql-generator/index.js:72
    const meta = { ...fieldData.meta };
                   ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)

ravensnowbird avatar Mar 28 '18 05:03 ravensnowbird

@ravensnowbird The reason is you are using an old version of node. What node version are you using? Can you upgrade node to at least node V8? https://nodejs.org/en/ I will document this in the readme later

timqian avatar Mar 28 '18 05:03 timqian

@timqian do you want a pull request with build configuration to transpile the package for older node?

ikatun avatar Sep 08 '18 17:09 ikatun