coryhouse / react-slingshot

React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app built in
MIT License
9.74k stars 2.95k forks source link

Setup script fails to complete on windows #577

Open jshnaidman opened 6 years ago

jshnaidman commented 6 years ago

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):

coryhouse commented 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

sclie001 commented 6 years ago

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

m10 commented 5 years ago

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
m10 commented 5 years ago

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

coryhouse commented 5 years ago

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