{"action":"opened","issue":{"url":"https://api.github.com/repos/enquirer/prompt-confirm/issues/1","repository_url":"https://api.github.com/repos/enquirer/prompt-confirm","labels_url":"https://api.github.com/repos/enquirer/prompt-confirm/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/enquirer/prompt-confirm/issues/1/comments","events_url":"https://api.github.com/repos/enquirer/prompt-confirm/issues/1/events","html_url":"https://github.com/enquirer/prompt-confirm/issues/1","id":183629854,"number":1,"title":"Can't use prompt-confirm","user":{"login":"nschoe","id":336111,"avatar_url":"https://avatars.githubusercontent.com/u/336111?v=3","gravatar_id":"","url":"https://api.github.com/users/nschoe","html_url":"https://github.com/nschoe","followers_url":"https://api.github.com/users/nschoe/followers","following_url":"https://api.github.com/users/nschoe/following{/other_user}","gists_url":"https://api.github.com/users/nschoe/gists{/gist_id}","starred_url":"https://api.github.com/users/nschoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nschoe/subscriptions","organizations_url":"https://api.github.com/users/nschoe/orgs","repos_url":"https://api.github.com/users/nschoe/repos","events_url":"https://api.github.com/users/nschoe/events{/privacy}","received_events_url":"https://api.github.com/users/nschoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-18T09:09:12Z","updated_at":"2016-10-18T09:09:12Z","closed_at":null,"body":"Hi,\r\nSorry it's me again.  \r\nI don't know if this is linked or not (because I had not used `prompt-confirm` before), but since I pulled the latest version of `enquirer`, to solve [the chaining issue](enquirer/enquirer#6), I cannot use the `prompt-confirm`.\r\n\r\nFor information (maybe this is useful) I have `git pull`ed the `enquirer` project, then I `cd`ed to my workspace and did `npm install /path/to/enquirer/clone`, it installed and I could use `enquirer`.\r\nNow I am trying to use `prompt-confirm` and this fails, here is a minimal snippet that fails on me:\r\n\r\n```Javascript\r\n'use strict';\r\n\r\nconst Enquirer = require('enquirer')\r\nconst inspect = require ('util').inspect\r\n\r\n\r\nfunction query (i) {\r\n    let enquirer = new Enquirer ()\r\n\r\n    enquirer.register ('confirm', require ('enquirer-prompt-confirm'))\r\n\r\n    enquirer.question ('QuestionA', 'Question A (' + i + ')?', {\r\n\t\ttype: 'confirm'\r\n\t})\r\n    enquirer.question ('QuestionB', 'Question B (' + i + ')?', {\r\n        type: 'confirme',\r\n    })\r\n\r\n    enquirer.ask()\r\n    .then (answers => {\r\n        console.log ('Answers #' + i)\r\n        console.log (inspect (answers))\r\n        console.log ('--')\r\n\r\n        if (i > 0) {\r\n            console.log ('Asking for argument ' + i + ' now...')\r\n            query (i-1)\r\n        }\r\n    })\r\n\t.catch( err => {\r\n\t\tconsole.error ('Err: ' + err)\r\n\t})\r\n}\r\n\r\nquery (3)\r\n```\r\n\r\nAs you noticed, I have used the same template to chain `prompt-confirm` commands, but it fails at the first: it asks me the first question, but then when I answer it fails. Here is the console session:\r\n\r\n```Bash\r\n? Question A (3)? Yesreadline.js:982\r\n            throw err;\r\n            ^\r\n\r\nTypeError: this.ui.write is not a function\r\n    at Confirm.onSubmit (/home/nschoe/workspace/xxx/node_modules/enquirer-prompt-confirm/index.js:71:11)\r\n    at UI.on (/home/nschoe/workspace/xxx/node_modules/component-emitter/index.js:65:8)\r\n    at UI.Emitter.emit (/home/nschoe/workspace/xxx/node_modules/component-emitter/index.js:133:20)\r\n    at emitOne (events.js:96:13)\r\n    at Interface.emit (events.js:188:7)\r\n    at Interface._onLine (readline.js:239:10)\r\n    at Interface._line (readline.js:585:8)\r\n    at Interface._ttyWrite (readline.js:862:14)\r\n    at ReadStream.onkeypress (readline.js:126:10)\r\n    at emitTwo (events.js:111:20)\r\n    at ReadStream.emit (events.js:191:7)\r\n    at emitKeys (internal/readline.js:389:14)\r\n    at next (native)\r\n    at ReadStream.onData (readline.js:972:36)\r\n    at emitOne (events.js:96:13)\r\n    at ReadStream.emit (events.js:188:7)\r\n```\r\n\r\nThis is weird, so might it be a problem induced by the fix on `enquirer`? Or is it a cache or dependency error on my side?"}}
{"actor":{"display_login":"nschoe"}}