Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 / Node 7 UnhandledPromiseRejectionWarning on prompt #447

Closed
macdonaldr93 opened this issue Nov 9, 2016 · 1 comment
Closed

Comments

@macdonaldr93
Copy link

When running inquirer on Windows 10, Node 7.x, I'm getting this breaking error. The CLI just hangs afterwards:

(node:5764) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: write EINVAL
(node:5764) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are
not handled will terminate the Node.js process with a non-zero exit code.

This is more or less the code that we're running:

async function(name) {
  let dirName = name;

  if (!dirName) {
    const answers = await prompt({
      type: 'input',
      name: 'dirName',
      message: 'What do you want to name the directory?',
      default: 'theme',
    });

    dirName = answers.dirName;
  }
}

Also tried without async/await, but still getting the error.

@mischah
Copy link
Collaborator

mischah commented Nov 23, 2016

Should be fixed with the current Node Release from today:

Quote from yeoman/yo#485 (comment)

Closing this since Node 7.2 fixes this issue:
https://nodejs.org/en/blog/release/v7.2.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants