mulesoft-labs / api-console-cli

A CLI tools for the API console.
Other
14 stars 15 forks source link

SyntaxError: Unexpected token { #10

Closed johnpaulhayes closed 6 years ago

johnpaulhayes commented 6 years ago

Hi Folks,

I get the following when I run the following:

api-console build ./api.raml

const {ApiBuild} = require('../lib/build');
      ^

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 Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

api-console: v0.2.3 Node: v4.2.6

RAML file was generated and validated using anypoint.mulesoft.com

jarrodek commented 6 years ago

Hi, Thanks for issue report. What version of Node do you have?

jarrodek commented 6 years ago

The module is working on node engine >= 6.4.0 hence the error on lower version. I will make an appropriate error message on lower versions of node.

jarrodek commented 6 years ago

Closed by https://github.com/mulesoft-labs/api-console-cli/commit/8a0b46c0bea54e222a72f52e57485c444c4e2163