diff --git a/lib/cmd.js b/lib/cmd.js index e58b852e..77af4017 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -1,6 +1,4 @@ const program = require('commander'); -const promptly = require('promptly'); -const utils = require('./utils/utils.js'); const Embark = require('../lib/index'); const i18n = require('./i18n/i18n.js'); let embark = new Embark; @@ -50,6 +48,7 @@ class Cmd { .action(function (name, options) { i18n.setOrDetectLocale(options.locale); if (name === undefined) { + const promptly = require('promptly'); return promptly.prompt(__("Name your app (default is %s):", 'embarkDapp'), { default: "embarkDApp", validator: validateName @@ -259,6 +258,7 @@ class Cmd { program .action(function (cmd) { console.log((__('unknown command') + ' "%s"').red, cmd); + let utils = require('./utils/utils.js'); let dictionary = ['new', 'demo', 'build', 'run', 'blockchain', 'simulator', 'test', 'upload', 'version']; let suggestion = utils.proposeAlternative(cmd, dictionary); if (suggestion) {