railsware / bozon

🛠 Command line tool for building, testing and publishing modern Electron applications
MIT License
758 stars 52 forks source link

Syntax-Error when creating new project #50

Closed Flor-IT closed 6 years ago

Flor-IT commented 6 years ago

Hello folks, I´m new to this, so maybe I´m doing something wrong. I had problems creating a new project with version 0.7.8

After installing with NPM I tried to start a new project and got this error:

xyz@machine: $ bozon new project-name
/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/prompts/list.js:32
      let index = _.findIndex(this.opt.choices.realChoices, ({ value }) => value === def);
                                                             ^

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:20:19)
    at Function.promptModule.restoreDefaultPrompts (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:55:33)
    at Object.inquirer.createPromptModule (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:65:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:77:28)

I switched back to v0.7.7 and it worked.

Flor-IT commented 6 years ago

I think it is caused by wrong nodejs version. I updated it to 8.9.1 LTS and it worked