Open jshnaidman opened 6 years ago
What command line are you using?
On Sun, Jun 17, 2018 at 2:00 PM jshnaidman notifications@github.com wrote:
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
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coryhouse/react-slingshot/issues/577, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnFpe68Cnx9vc0db-l3PwCBYmh8q8-Rks5t9qdhgaJpZM4Uq77y .
-- Cory House Principal: reactjsconsulting.com http://www.reactjsconsulting.com Author: Pluralsight Courses http://www.pluralsight.com/author/cory-house
I am getting the same issue, mentioned above using windows 10, command line: Git Bash
it seem the underlying issue lays in the prompt package as described here: https://github.com/flatiron/prompt/issues/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
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). https://github.com/flatiron/prompt/issues/183
An alternative could be https://github.com/terkelg/prompts
Great point @m10 - I'm currently buried, but I'd welcome a PR to switch to prompts if you're willing.
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):