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

Setup script fails to complete on windows #577

Open
jshnaidman opened this issue Jun 17, 2018 · 5 comments
Open

Setup script fails to complete on windows #577

jshnaidman opened this issue Jun 17, 2018 · 5 comments

Comments

@jshnaidman
Copy link

Describe the bug
When I run npm run setup, it completes the script but hangs after printing 'Setup Complete! Cleaning up...'

To Reproduce

npm install
npm run setup

Expected behavior
The setup script to complete

Desktop (please complete the following information):

  • OS: Windows 10
  • NPM version: 5.6.0
  • Nodejs version: v8.11.3
@coryhouse
Copy link
Owner

coryhouse commented Jun 20, 2018 via email

@sclie001
Copy link

I am getting the same issue, mentioned above using windows 10, command line: Git Bash

@m10
Copy link
Contributor

m10 commented Oct 16, 2018

it seem the underlying issue lays in the prompt package as described here: flatiron/prompt#112
Nodejs won't exit a process if there are undestroyed handles.
Adding process.exit(0); in the rimraf callback for removing the tools/setup folder seems to workaround this issue.

I used the packge https://github.com/mafintosh/why-is-node-running which gives the following active handles:

# TTYWRAP
C:\xampp\htdocs\react-boilerpalte\node_modules\prompt\lib\prompt.js:76 - stdin   = options.stdin  || process.stdin;
C:\xampp\htdocs\react-boilerpalte\tools\setup\setup.js:16

@m10
Copy link
Contributor

m10 commented Oct 16, 2018

it may be worth it to check alternatives since the prompt package seems not to be well mantained (last npm release 3 years ago, last commit 1 year ago).
flatiron/prompt#183

An alternative could be https://github.com/terkelg/prompts

@coryhouse
Copy link
Owner

Great point @m10 - I'm currently buried, but I'd welcome a PR to switch to prompts if you're willing.

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

4 participants