-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Git Bash Error - Cannot read property 'substring' #272
Comments
FWIW, Powershell2 is a good console for Windows environment. If you want more control on the look, wrap it inside Console2. - That was my setup a couple years ago when I was working on ASP projects. For the bug itself, someone or me is going to take a look eventually. But I don't have a windows machine handy currently, and it's not exactly at the top of my OSS todo list. - If you feel like debugging this one, please do! :) |
Have the same issue. The problem is that readline does not consider Git Bash a tty,
Git Bash is based on mintty. From mintty docs:
See also: nodejs/node-v0.x-archive#6459
From my research I do not think that it would be possible to fix it, but I am not competent in this question, maybe @SBoudrias has some ideas. If this is actually unfixable, than the solution would be (for me at least) to check if the process supports tty and respond with a user-friendly error message (maybe it can even be built into inquirer, if it strictly requires tty, I'm not sure). Some related stuff: |
Getting the same problem on Babun ... also mintty based I believe. |
Any update this issue? |
@ayhankuru What about this comment is not clear enough? #272 (comment) |
@matthewp sorry, ı'm checkout that comment |
FWIW, that's the issue on Node side tracking the issue you're having nodejs/node#3006 Node always had issue with fake windows command lines. Not sure what their plan is for eventually fixing. |
Puzzlingly enough, I executed
I'm here trying to find info to debug this package which depends on Inquirer, and it's failing on said configuration. |
I ran across a similar issue and found it worked when running node using winpty in Cygwin's mintty console with the fish shell. Edit: I fail at linking. |
Please try the latest inquirer version and let me know if that's still an issue. A lot of work have been done on the Node.js side, and I remove all Inquirer custom readline handling as the Node version is now good enough. |
When running a .js in git bash, say 'index.js', I got these results:
|
Seems to run on Windows cmd but not Git Bash which sucks because Git Bash is the only sane thing to use on Windows. I had to download ConEmu and use Git Bash from there but now I get a prompt when closing console windows that can't be disabled even though the check-box is unchecked to not confirm. Also somethin'. Nice module.
C:\Users\Admin\Development\Working\package-generator.js\node_modules\inquirer\no de_modules\rx-lite\rx.lite.js:549
throw e;
^
TypeError: Cannot read property 'substring' of undefined
at Interface.rl._getCursorPos (C:\Users\Admin\Development\Working\package-ge nerator.js\node_modules\inquirer\node_modules\readline2\index.js:55:51)
at ScreenManager.render (C:\Users\Admin\Development\Working\package-generato r.js\node_modules\inquirer\lib\utils\screen-manager.js:19:27)
at Prompt.render (C:\Users\Admin\Development\Working\package-generator.js\no de_modules\inquirer\lib\prompts\input.js:75:15)
at Prompt.run (C:\Users\Admin\Development\Working\package-generator.js\node modules\inquirer\lib\prompts\input.js:49:8)
at Prompt.run (C:\Users\Admin\Development\Working\package-generator.js\node modules\inquirer\lib\prompts\base.js:57:8)
at Object. (C:\Users\Admin\Development\Working\package-generator. js\node_modules\inquirer\lib\ui\prompt.js:83:12)
at module.exports (C:\Users\Admin\Development\Working\package-generator.js\n ode_modules\inquirer\node_modules\run-async\index.js:15:21)
at C:\Users\Admin\Development\Working\package-generator.js\node_modules\inqu irer\lib\utils\utils.js:16:7
at tryCatcher (C:\Users\Admin\Development\Working\package-generator.js\node modules\inquirer\node_modules\rx-lite\rx.lite.js:537:29)
at setDisposable (C:\Users\Admin\Development\Working\package-generator.js\no de_modules\inquirer\node_modules\rx-lite\rx.lite.js:5380:36)
The text was updated successfully, but these errors were encountered: