dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.63k stars 278 forks source link

bug in Inquirer library? - TypeError: Cannot read property 'setRawMode' of null #265

Closed ORESoftware closed 6 years ago

ORESoftware commented 7 years ago

Looks like Vorpal uses Inquirer underneath the hood

I see this error when using Vorpal

 TypeError: Cannot read property 'setRawMode' of null
    at ReadStream.setRawMode (tty.js:38:15)
    at Interface._setRawMode (readline.js:191:16)
    at Interface.close (readline.js:308:10)
    at UI.close (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/inquirer/lib/ui/baseUI.js:54:11)
    at UI.onForceClose (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/inquirer/lib/ui/baseUI.js:34:8)
    at emitOne (events.js:101:20)
    at process.emit (events.js:188:7)

If you want anymore info, please let me know, not sure if you wanted to see this, I plan to report it directly to Inquirer.

ORESoftware commented 7 years ago

So I looked into it, and it looks like Vorpal is using a very old version of Inquirer, this is the version being used:

{
  "_args": [
    [
      {
        "raw": "inquirer@0.11.0",
        "scope": null,
        "escapedName": "inquirer",
        "name": "inquirer",
        "rawSpec": "0.11.0",
        "spec": "0.11.0",
        "type": "version"
      },
      "/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/vorpal"
    ]
  ],
  "_from": "inquirer@0.11.0",
  "_id": "inquirer@0.11.0",
  "_inCache": true,
  "_location": "/inquirer",
  "_nodeVersion": "0.12.7",
  "_npmUser": {
    "name": "sboudrias",
    "email": "admin@simonboudrias.com"
  },
  "_npmVersion": "2.14.2",
  "_phantomChildren": {},
  "_requested": {
    "raw": "inquirer@0.11.0",
    "scope": null,
    "escapedName": "inquirer",
    "name": "inquirer",
    "rawSpec": "0.11.0",
    "spec": "0.11.0",
    "type": "version"
  },
  "_requiredBy": [
    "/vorpal"
  ],
  "_resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.0.tgz",
  "_shasum": "7448bfa924092af311d47173bbab990cae2bb027",
  "_shrinkwrap": null,
  "_spec": "inquirer@0.11.0",
  "_where": "/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d/node_modules/vorpal",
  "author": {
    "name": "Simon Boudrias",
    "email": "admin@simonboudrias.com"
  },
  "bugs": {
    "url": "https://github.com/SBoudrias/Inquirer.js/issues"
  },
  "dependencies": {
    "ansi-escapes": "^1.1.0",
    "ansi-regex": "^2.0.0",
    "chalk": "^1.0.0",
    "cli-cursor": "^1.0.1",
    "cli-width": "^1.0.1",
    "figures": "^1.3.5",
    "lodash": "^3.3.1",
    "readline2": "^1.0.1",
    "run-async": "^0.1.0",
    "rx-lite": "^3.1.2",
    "strip-ansi": "^3.0.0",
    "through": "^2.3.6"
  },
  "description": "A collection of common interactive command line user interfaces.",
  "devDependencies": {
    "chai": "^3.0.0",
    "cmdify": "^0.0.4",
    "grunt": "^0.4.1",
    "grunt-cli": "^0.1.8",
    "grunt-contrib-jshint": "^0.11.1",
    "grunt-mocha-test": "^0.12.7",
    "mocha": "^2.2.1",
    "mockery": "^1.4.0",
    "sinon": "^1.12.1"
  },
  "directories": {},
  "dist": {
    "shasum": "7448bfa924092af311d47173bbab990cae2bb027",
    "tarball": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.0.tgz"
  },
  "files": [
    "lib"
  ],
  "gitHead": "8a7a538d365a15a9ba9a97e464a487a7d2410dc4",
  "homepage": "https://github.com/SBoudrias/Inquirer.js#readme",
  "keywords": [
    "command",
    "prompt",
    "stdin",
    "cli",
    "tty",
    "menu"
  ],
  "license": "MIT",
  "main": "lib/inquirer.js",
  "maintainers": [
    {
      "name": "sboudrias",
      "email": "admin@simonboudrias.com"
    }
  ],
  "name": "inquirer",
  "optionalDependencies": {},
  "readme": "Inquirer.js\n===========\n\n[![npm](https://badge.fury.io/js/inquirer.svg)](http://badge.fury.io/js/inquirer) [![tests](https://travis-ci.org/SBoudrias/Inquirer.js.svg?branch=master)](http://travis-ci.org/SBoudrias/Inquirer.js) [![dependencies](https://david-dm.org/SBoudrias/Inquirer.js.svg?theme=shields.io)](https://david-dm.org/SBoudrias/Inquirer.js)\n\nA collection of common interactive command line user interfaces.\n\n\n## Goal and Philosophy\n\n<img align=\"right\" alt=\"Inquirer Logo\" src=\"/assets/inquirer_readme.png\" title=\"Inquirer.js\"/>\n\n**`Inquirer.js`** strives to be an easily embeddable and beautiful command line interface for [Node.js](https://nodejs.org/) (and perhaps the \"CLI [Xanadu](https://en.wikipedia.org/wiki/Xanadu_(Citizen_Kane))\").\n\n**`Inquirer.js`** should ease the process of\n- providing *error feedback*\n- *asking questions*\n- *parsing* input\n- *validating* answers\n- managing *hierarchical prompts*\n\n> **Note:** **`Inquirer.js`** provides the user interface, and the inquiry session flow. If you're searching for a full blown command line program utility, then check out [Commander.js](https://github.com/visionmedia/commander.js).\n\n\n## Documentation\n\n### Installation\n\n``` shell\nnpm install inquirer\n```\n\n```javascript\nvar inquirer = require(\"inquirer\");\ninquirer.prompt([/* Pass your questions in here */], function( answers ) {\n\t// Use user feedback for... whatever!!\n});\n```\n\n\n### Examples (Run it and see it)\nCheckout the `examples/` folder for code and interface examples.\n\n``` shell\nnode examples/pizza.js\nnode examples/checkbox.js\n# etc...\n```\n\n\n### Methods\n\n`inquirer.prompt( questions, callback )`\n\nLaunch the prompt interface (inquiry session)\n\n- **questions** (Array) containing [Question Object](#question) (using the [reactive interface](#reactive-interface), you can also pass a `Rx.Observable` instance)\n- **callback** (Function) first parameter is the [Answers Object](#answers)\n\n\n### Objects\n\n#### Question\nA question object is a `hash` containing question related values:\n\n- **type**: (String) Type of the prompt. Defaults: `input` - Possible values: `input`, `confirm`,\n`list`, `rawlist`, `password`\n- **name**: (String) The name to use when storing the answer in the answers hash.\n- **message**: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers.\n- **default**: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers.\n- **choices**: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers.  \nArray values can be simple `strings`, or `objects` containing a `name` (to display in list), a `value` (to save in the answers hash) and a `short` (to display after selection) properties. The choices array can also contain [a `Separator`](#separator).\n- **validate**: (Function) Receive the user input and should return `true` if the value is valid, and an error message (`String`) otherwise. If `false` is returned, a default error message is provided.\n- **filter**: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the _Answers_ hash.\n- **when**: (Function, Boolean) Receive the current user answers hash and should return `true` or `false` depending on whether or not this question should be asked. The value can also be a simple boolean.\n\n`default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronously using `this.async()`. You just have to pass the value you'd normally return to the callback option.\n\n``` javascript\n{\n  validate: function(input) {\n\n    // Declare function as asynchronous, and save the done callback\n    var done = this.async();\n\n    // Do async stuff\n    setTimeout(function() {\n      if (typeof input !== \"number\") {\n        // Pass the return value in the done callback\n        done(\"You need to provide a number\");\n        return;\n      }\n      // Pass the return value in the done callback\n      done(true);\n    }, 3000);\n  }\n}\n```\n\n### Answers\nA key/value hash containing the client answers in each prompt.\n\n- **Key** The `name` property of the _question_ object\n- **Value** (Depends on the prompt)\n  - `confirm`: (Boolean)\n  - `input` : User input (filtered if `filter` is defined) (String)\n  - `rawlist`, `list` : Selected choice value (or name if no value specified) (String)\n\n### Separator\nA separator can be added to any `choices` array:\n\n```\n// In the question object\nchoices: [ \"Choice A\", new inquirer.Separator(), \"choice B\" ]\n\n// Which'll be displayed this way\n[?] What do you want to do?\n > Order a pizza\n   Make a reservation\n   --------\n   Ask opening hours\n   Talk to the receptionist\n```\n\nThe constructor takes a facultative `String` value that'll be use as the separator. If omitted, the separator will be `--------`.\n\nSeparator instances have a property `type` equal to `separator`. This should allow tools façading Inquirer interface from detecting separator types in lists.\n\nPrompts type\n---------------------\n\n> **Note:**: _allowed options written inside square brackets (`[]`) are optional. Others are required._\n\n#### List - `{ type: \"list\" }`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must be the choice `index` in the array or a choice `value`)\n\n![List prompt](https://dl.dropboxusercontent.com/u/59696254/inquirer/list-prompt.png)\n\n---\n\n#### Raw List - `{ type: \"rawlist\" }`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must the choice `index` in the array)\n\n![Raw list prompt](https://i.cloudup.com/LcRGpXI0CX-3000x3000.png)\n\n---\n\n#### Expand - `{ type: \"expand\" }`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must be the choice `index` in the array)\n\nNote that the `choices` object will take an extra parameter called `key` for the `expand` prompt. This parameter must be a single (lowercased) character. The `h` option is added by the prompt and shouldn't be defined by the user.\n\nSee `examples/expand.js` for a running example.\n\n![Expand prompt closed](https://dl.dropboxusercontent.com/u/59696254/inquirer/expand-prompt-1.png)\n![Expand prompt expanded](https://dl.dropboxusercontent.com/u/59696254/inquirer/expand-prompt-2.png)\n\n---\n\n#### Checkbox - `{ type: \"checkbox\" }`\n\nTake `type`, `name`, `message`, `choices`[, `filter`, `validate`, `default`] properties. `default` is expected to be an Array of the checked choices value.\n\nChoices marked as `{ checked: true }` will be checked by default.\n\nChoices whose property `disabled` is truthy will be unselectable. If `disabled` is a string, then the string will be outputted next to the disabled choice, otherwise it'll default to `\"Disabled\"`. The `disabled` property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string.\n\n![Checkbox prompt](https://dl.dropboxusercontent.com/u/59696254/inquirer/checkbox-prompt.png)\n\n---\n\n#### Confirm - `{ type: \"confirm\" }`\n\nTake `type`, `name`, `message`[, `default`] properties. `default` is expected to be a boolean if used.\n\n![Confirm prompt](https://dl.dropboxusercontent.com/u/59696254/inquirer/confirm-prompt.png)\n\n---\n\n#### Input - `{ type: \"input\" }`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.\n\n![Input prompt](https://dl.dropboxusercontent.com/u/59696254/inquirer/input-prompt.png)\n\n---\n\n#### Password - `{ type: \"password\" }`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.\n\n![Password prompt](https://dl.dropboxusercontent.com/u/59696254/inquirer/password-prompt.png)\n\n## User Interfaces and layouts\n\nAlong with the prompts, Inquirer offers some basic text UI.\n\n#### Bottom Bar - `inquirer.ui.BottomBar`\n\nThis UI present a fixed text at the bottom of a free text zone. This is useful to keep a message to the bottom of the screen while outputting command outputs on the higher section.\n\n```javascript\nvar ui = new inquirer.ui.BottomBar();\n\n// pipe a Stream to the log zone\noutputStream.pipe( ui.log );\n\n// Or simply write output\nui.log.write(\"something just happened.\");\nui.log.write(\"Almost over, standby!\");\n\n// During processing, update the bottom bar content to display a loader\n// or output a progress bar, etc\nui.updateBottomBar(\"new bottom bar content\");\n```\n\n#### Prompt - `inquirer.ui.Prompt`\n\nThis is UI layout used to run prompt. This layout is returned by `inquirer.prompt` and you should probably always use `inquirer.prompt` to interface with this UI.\n\n\n## Reactive interface\n\nInternally, Inquirer uses the [JS reactive extension](https://github.com/Reactive-Extensions/RxJS) to handle events and async flows.\n\nThis mean you can take advantage of this feature to provide more advanced flows. For example, you can dynamically add questions to be asked:\n\n```js\nvar prompts = Rx.Observable.create(function( obs ) {\n  obs.onNext({ /* question... */ });\n  setTimeout(function () {\n    obs.onNext({ /* question... */ });\n    obs.onCompleted();\n  });\n});\n\ninquirer.prompt(prompts);\n```\n\nAnd using the `process` property, you have access to more fine grained callbacks:\n\n```js\ninquirer.prompt(prompts).process.subscribe(\n  onEachAnswer,\n  onError,\n  onComplete\n);\n```\n\n## Support (OS Terminals)\n\nYou should expect mostly good support for the CLI below. This does not mean we won't\nlook at issues found on other command line - feel free to report any!\n\n- **Mac OS**:\n  - Terminal.app\n  - iTerm\n- **Windows**:\n  - cmd.exe\n  - Powershell\n  - Cygwin\n- **Ubuntu**:\n  - Terminal\n\n\n## News on the march (Release notes)\n\nPlease refer to the [Github releases section for the changelog](https://github.com/SBoudrias/Inquirer.js/releases)\n\n\n## Contributing\n\n**Style Guide**  \nPlease brief yourself on [Idiomatic.js](https://github.com/rwldrn/idiomatic.js) style guide with two space indent  \n\n**Unit test**  \nUnit test are written in [Mocha](http://visionmedia.github.io/mocha/). Please add a unit test for every new feature or bug fix. `npm test` to run the test suite.  \n\n**Documentation**  \nAdd documentation for every API change. Feel free to send corrections\nor better docs!  \n\n**Pull Requests**  \nSend _fixes_ PR on the `master` branch. Any new features should be send on the `wip`branch.\n\nWe're looking to offer good support for multiple prompts and environments. If you want to\nhelp, we'd like to keep a list of testers for each terminal/OS so we can contact you and\nget feedback before release. Let us know if you want to be added to the list (just tweet\nto @vaxilart) or just add your name to [the wiki](https://github.com/SBoudrias/Inquirer.js/wiki/Testers)\n\n## License\n\nCopyright (c) 2012 Simon Boudrias (twitter: @vaxilart)  \nLicensed under the MIT license.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/SBoudrias/Inquirer.js.git"
  },
  "scripts": {
    "test": "grunt --verbose"
  },
  "version": "0.11.0"
}
ORESoftware commented 7 years ago

So perhaps it would be appropriate to bump to a newer version of Inquirer?

Except, when I look at the package.json of this project, it says:

"inquirer": "^3.0.6",

honestly, I am confused, why is the version of Vorpal I installed using such an old version of Inquirer?

ORESoftware commented 7 years ago

So here is the Vorpal package.json in my project


{
  "_args": [
    [
      {
        "raw": "vorpal@^1.12.0",
        "scope": null,
        "escapedName": "vorpal",
        "name": "vorpal",
        "rawSpec": "^1.12.0",
        "spec": ">=1.12.0 <2.0.0",
        "type": "range"
      },
      "/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d"
    ]
  ],
  "_from": "vorpal@>=1.12.0 <2.0.0",
  "_id": "vorpal@1.12.0",
  "_inCache": true,
  "_location": "/vorpal",
  "_nodeVersion": "3.2.0",
  "_npmOperationalInternal": {
    "host": "packages-12-west.internal.npmjs.com",
    "tmp": "tmp/vorpal-1.12.0.tgz_1491758127385_0.5540205927100033"
  },
  "_npmUser": {
    "name": "dthree",
    "email": "threedeecee@gmail.com"
  },
  "_npmVersion": "3.7.2",
  "_phantomChildren": {},
  "_requested": {
    "raw": "vorpal@^1.12.0",
    "scope": null,
    "escapedName": "vorpal",
    "name": "vorpal",
    "rawSpec": "^1.12.0",
    "spec": ">=1.12.0 <2.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/"
  ],
  "_resolved": "https://registry.npmjs.org/vorpal/-/vorpal-1.12.0.tgz",
  "_shasum": "4be7b2a4e48f8fcfc9cf3648c419d311c522159d",
  "_shrinkwrap": null,
  "_spec": "vorpal@^1.12.0",
  "_where": "/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-d",
  "author": {
    "name": "dthree"
  },
  "bugs": {
    "url": "https://github.com/dthree/vorpal/issues"
  },
  "dependencies": {
    "babel-polyfill": "^6.3.14",
    "chalk": "^1.1.0",
    "in-publish": "^2.0.0",
    "inquirer": "0.11.0",
    "lodash": "^4.5.1",
    "log-update": "^1.0.2",
    "minimist": "^1.2.0",
    "node-localstorage": "^0.6.0",
    "strip-ansi": "^3.0.0",
    "wrap-ansi": "^2.0.0"
  },
  "description": "Node's first framework for building immersive CLI apps.",
  "devDependencies": {
    "babel": "^6.3.26",
    "babel-core": "^6.4.5",
    "babel-preset-es2015": "^6.3.13",
    "bluebird": "^3.1.1",
    "gulp": "^3.9.0",
    "gulp-babel": "^6.1.2",
    "gulp-changed": "^1.3.0",
    "gulp-eslint": "^1.1.1",
    "gulp-xo": "^0.7.0",
    "load-plugins": "^2.1.0",
    "mocha": "^2.2.5",
    "moment": "^2.10.3",
    "request": "^2.58.0",
    "should": "^6.0.3",
    "vorpal-less": "0.0.4",
    "vorpal-repl": "^1.1.8",
    "xo": "^0.9.0"
  },
  "directories": {},
  "dist": {
    "shasum": "4be7b2a4e48f8fcfc9cf3648c419d311c522159d",
    "tarball": "https://registry.npmjs.org/vorpal/-/vorpal-1.12.0.tgz"
  },
  "engines": {
    "iojs": ">= 1.0.0",
    "node": ">= 0.10.0"
  },
  "files": [
    "dist"
  ],
  "gitHead": "d3211623a172a694559063111dd9f7ee430c5be3",
  "homepage": "https://github.com/dthree/vorpal#readme",
  "keywords": [
    "api",
    "cli",
    "repl",
    "shell",
    "immersive",
    "framework",
    "app",
    "application",
    "command",
    "commander",
    "automated",
    "prompt",
    "inquirer"
  ],
  "license": "MIT",
  "main": "./dist/vorpal.js",
  "maintainers": [
    {
      "name": "dthree",
      "email": "threedeecee@gmail.com"
    },
    {
      "name": "scotthovestadt",
      "email": "scott.hovestadt@gmail.com"
    }
  ],
  "name": "vorpal",
  "optionalDependencies": {},
  "readme": "# Vorpal\r\n\r\n\r\n[![Build Status](https://travis-ci.org/dthree/vorpal.svg)](https://travis-ci.org/dthree/vorpal/)\r\n<a href=\"https://www.npmjs.com/package/vorpal\">\r\n  <img src=\"https://img.shields.io/npm/dt/vorpal.svg\" alt=\"NPM Downloads\" />\r\n</a>\r\n[![Package Quality](http://npm.packagequality.com/shield/vorpal.svg)](http://packagequality.com/#?package=vorpal)\r\n<a href=\"https://www.npmjs.com/package/vorpal\">\r\n  <img src=\"https://img.shields.io/npm/v/vorpal.svg\" alt=\"NPM Version\" />\r\n</a>\r\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\r\n\r\n> Conquer the command-line.\r\n\r\n```text\r\n              (O)\r\n              <M\r\n   o          <M\r\n  /| ......  /:M\\------------------------------------------------,,,,,,\r\n(O)[ vorpal ]::@+}==========================================------------>\r\n  \\| ^^^^^^  \\:W/------------------------------------------------''''''\r\n   o          <W\r\n              <W\r\n              (O)\r\n```\r\n\r\nVorpal is Node's first framework for building interactive CLI applications. With a simple and powerful API, Vorpal opens the door to a new breed of rich, immersive CLI environments like [cash](https://github.com/dthree/cash) and [wat](https://github.com/dthree/wat).\r\n\r\n## Notice\r\n\r\nThis is now an [OPEN Open Source](http://openopensource.org/) project. I am not able to invest a significant amount of time into maintaining Vorpal and so am looking for volunteers who would like to be active maintainers of the project. If you are interested, shoot me a note.\r\n\r\n## Contents\r\n\r\n* [Introduction](#introduction)\r\n* [Getting Started](#getting-started)\r\n* [API](#api)\r\n* [Extensions](#extensions)\r\n* [FAQ](#faq)\r\n* [License](#license)\r\n\r\n## Introduction\r\n\r\nInspired by and based on [commander.js](https://www.npmjs.com/package/commander), Vorpal is a framework for building immersive CLI applications built on an interactive prompt provided by [inquirer.js](https://www.npmjs.com/package/inquirer). Vorpal launches Node into an isolated CLI environment and provides a suite of API commands and functionality including:\r\n\r\n* [x] Simple, powerful command creation\r\n* [x] Supports optional, required and variadic arguments and options\r\n* [x] Piped commands\r\n* [x] Persistent command history\r\n* [x] Built-in help\r\n* [x] Built-in tabbed auto-completion\r\n* [x] Command-specific auto-completion\r\n* [x] Customizable prompts\r\n* [x] Extensive terminal control\r\n* [x] Custom event listeners\r\n* [x] And more\r\n\r\nVorpal supports [community extensions](https://github.com/vorpaljs/awesome-vorpaljs), which empower it to do awesome things such as [piping commands to less](https://github.com/vorpaljs/vorpal-less), [importing commands live](https://github.com/vorpaljs/vorpal-use) or supporting a [built-in REPL](https://github.com/vorpaljs/vorpal-repl).\r\n\r\nMade with :heart: by [dthree](https://github.com/dthree).\r\n\r\n## Getting Started\r\n\r\n##### Quick Start\r\n\r\nInstall `vorpal` into your project:\r\n\r\n```bash\r\n$ npm install vorpal --save\r\n```\r\n\r\nCreate a `.js` file and add the following:\r\n\r\n```js\r\nconst vorpal = require('vorpal')();\r\n\r\nvorpal\r\n  .command('foo', 'Outputs \"bar\".')\r\n  .action(function(args, callback) {\r\n    this.log('bar');\r\n    callback();\r\n  });\r\n\r\nvorpal\r\n  .delimiter('myapp$')\r\n  .show();\r\n```\r\nThis creates an instance of Vorpal, adds a command which logs \"bar\", sets the prompt delimiter to say \"myapp$\", and shows the prompt.\r\n\r\nRun your project file. Your Node app has become a CLI:\r\n\r\n```bash\r\n$ node server.js\r\nmyapp~$\r\n```\r\n\r\nTry out your \"foo\" command.\r\n\r\n```bash\r\nmyapp~$ foo\r\nbar\r\nmyapp~$\r\n```\r\n\r\nNow type \"help\" to see Vorpal's built in commands in addition to \"foo\":\r\n\r\n```bash\r\nmyapp~$ help\r\n\r\n  Commands\r\n\r\n    help [command]    Provides help for a given command.\r\n    exit [options]    Exits instance of Vorpal.\r\n    foo               Outputs \"bar\".\r\n\r\nmyapp~$\r\n```\r\n\r\nThere's the basics. Once you get the hang of it, [follow this tutorial](http://developer.telerik.com/featured/creating-node-js-command-line-utilities-improve-workflow/) or read on to learn what else Vorpal can do.\r\n\r\n##### Community\r\n\r\nQuestions? Use the `vorpal.js` StackOverflow tag for fast answers that help others, or jump into chat on Gitter.\r\n\r\n- [Stack Overflow](http://stackoverflow.com/questions/tagged/vorpal.js) \r\n- [Gitter Chat](https://gitter.im/dthree/vorpal?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) \r\n- [Vorpal extensions](https://github.com/vorpaljs/awesome-vorpaljs#vorpal-extensions) \r\n- [Projects made with Vorpal](https://github.com/vorpaljs/awesome-vorpaljs) \r\n- [Follow @vorpaljs](https://twitter.com/vorpaljs) \r\n\r\n## [API](https://github.com/dthree/vorpal/wiki)\r\n\r\n##### [Command](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command)\r\n- [`vorpal.command`](https://github.com/dthree/vorpal/wiki/api-%7C-vorpal.command#vorpalcommandcommand-description)\r\n- [`command.description`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commanddescriptionstring)\r\n- [`command.alias`](https://github.com/dthree/vorpal/wiki/api-%7C-vorpal.command#commandaliasname-names)\r\n- [`command.parse`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandparseparsefunction)\r\n- [`command.option`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandoptionstring-description)\r\n- [`command.hidden`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandhidden)\r\n- [`command.remove`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandremove)\r\n- [`command.help`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandhelp)\r\n- [`command.autocomplete`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandautocompletearray-or-object-or-function)\r\n- [`command.action`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandactionfunction)\r\n- [`command.cancel`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandcancelfunction)\r\n\r\n##### [Mode](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode)\r\n- [`vorpal.mode`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal.mode#vorpalmodecommand-description)\r\n- [`mode.delimiter`](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode#modedelimiterstring)\r\n- [`mode.init`](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode#modeinitfunction)\r\n- [`mode.action`](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode#modeactionfunction)\r\n\r\n##### [Catch](https://github.com/dthree/vorpal/wiki/API-|-vorpal.catch)\r\n- [`vorpal.catch`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal.catch#catchcommand-description)\r\n\r\n##### [CommandInstance](https://github.com/dthree/vorpal/wiki/API-|-CommandInstance)\r\n- [`commandInstance.log`](https://github.com/dthree/vorpal/wiki/API-%7C-CommandInstance#commandinstancelogstring-strings)\r\n- [`commandInstance.prompt`](https://github.com/dthree/vorpal/wiki/API-%7C-CommandInstance#commandinstancepromptobject-callback)\r\n- [`commandInstance.delimiter`](https://github.com/dthree/vorpal/wiki/API-%7C-CommandInstance#commandinstancedelimiterstring)\r\n\r\n##### [UI](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui)\r\n- [`ui.delimiter`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uidelimitertext)\r\n- [`ui.input`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiinputtext)\r\n- [`ui.imprint`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiimprint)\r\n- [`ui.submit`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uisubmittext)\r\n- [`ui.cancel`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uicancel)\r\n- [`ui.imprint`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiimprint)\r\n- [`ui.redraw`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawtext-text)\r\n- [`ui.redraw.clear`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawclear)\r\n- [`ui.redraw.done`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawdone)\r\n\r\n##### [Vorpal](https://github.com/dthree/vorpal/wiki/API-|-vorpal)\r\n- [`.parse`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalparseargv-options)\r\n- [`.delimiter`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpaldelimiterstring)\r\n- [`.show`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalshow)\r\n- [`.find`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalfindstring)\r\n- [`.exec`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalexeccommand-callback)\r\n- [`.execSync`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalexecsynccommand-options)\r\n- [`.log`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpallogstring-strings)\r\n- [`.history`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalhistoryid)\r\n- [`.localStorage`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpallocalstorageid)\r\n- [`.help`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalhelpfunction)\r\n- [`.pipe`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalpipefunction)\r\n- [`.use`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpaluseextension)\r\n\r\n##### [Events](https://github.com/dthree/vorpal/wiki/Docs-%7C-Events)\r\n\r\n\r\n## Extensions\r\n\r\nYou can build your own Vorpal commands and extensions.\r\n\r\n- [List of awesome extensions](https://github.com/vorpaljs/awesome-vorpaljs#vorpal-extensions)\r\n- [Building your own extension](https://github.com/dthree/vorpal/wiki/Docs-%7C-Creating-Extensions)\r\n\r\n\r\n## [FAQ](https://github.com/dthree/vorpal/wiki/FAQ)\r\n\r\n- [What is an \"immersive CLI app?\"](https://github.com/dthree/vorpal/wiki/FAQ#what-is-an-immersive-cli-app)\r\n- [Wasn't this called Vantage?](https://github.com/dthree/vorpal/wiki/FAQ#uh-wasnt-this-called-vantage)\r\n\r\n\r\n## Why Vorpal?\r\n\r\n```text\r\nOne, two! One, two! and through and through\r\nThe vorpal blade went snicker-snack!\r\nHe left it dead, and with its head\r\nHe went galumphing back.\r\n\r\nLewis Carroll, Jabberwocky\r\n```\r\n\r\n\r\n##### Life Goals:\r\n\r\n- <s>Build a popular framework based on the [Jabberwocky](https://en.wikipedia.org/wiki/Jabberwocky) poem.</s>\r\n\r\n\r\n## License\r\n\r\nMIT © [David Caccavella](https://github.com/dthree)\r\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/dthree/vorpal.git"
  },
  "scripts": {
    "prepublish": "in-publish && gulp build || not-in-publish",
    "test": "gulp build; mocha;"
  },
  "version": "1.12.0",
  "xo": {
    "space": true,
    "rules": {
      "no-eval": 0,
      "no-unused-expressions": 0,
      "max-nested-callbacks": 0,
      "no-proto": 0,
      "wrap-iife": 0,
      "global-require": 0,
      "no-negated-condition": 0,
      "no-loop-func": 0,
      "no-implicit-coercion": 0,
      "no-use-extend-native/no-use-extend-native": 0,
      "no-undef": 0
    }
  }
}
ORESoftware commented 7 years ago

My only guess is that Vorpal upgraded to Inquirer 3.0.6 and then downgraded to 0.11.0.

milesj commented 7 years ago

Released versions of Vorpal are on the old Inquirer 0.11 version. Our master branch is on Inquirer 3.0.6 as we're working on Vorpal v2.

In what circumstance is the setRawMode error occurring?

ORESoftware commented 7 years ago

Hi @milesj not exactly sure what is causing that setRawMode error, let me look into it tomorrow

ORESoftware commented 7 years ago

@milesj I am no expert, but maybe create Vorpal2 and just put it in a different repo? that way master branch can always point to latest released production-ready code (which is Vorpal 1.x.x at the moment).

Otherwise, not sure how else to easily manage things - in theory master should always be what's released.

milesj commented 7 years ago

@ORESoftware I agree. It was a bit of an oversight to not use a branch and now it's far too late to do so.

ORESoftware commented 7 years ago

do what you want to do, but I wouldn't say it's too late, you could revert master back to the most recent v1.x release, and then take your latest master to a different Git repo and just start Vorpal2.

That being said, I think it's reasonable to have version 1,2,3,4,5,6,7, etc, but I think it would be unreasonable to have to have 7 different git repos of an official project. So I guess creating a different repo for each major version is not really the way to go. Like I said, I am no expert on this one, never been in your position.

milesj commented 7 years ago

I reset master back to 1.* code if you want to test again.

ORESoftware commented 6 years ago

yeah this error was my fault as I recall, will close.