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

Select crashing in VsCode + Git Bash: Cannot read properties of undefined (reading 'split') #386

Open
nvuillam opened this issue Jan 29, 2023 · 2 comments

Comments

@nvuillam
Copy link

Describe the bug

When using select, strage crash, and unable to leave script (any key pressed displays again the same error )

 🦙 Hit ENTER when done (or if previously done on the same repository) » - Use arrow-keys. Return to submit.
>   ☑ Yes
    ☓ No
    ⛔ Exit this script
TypeError: Cannot read properties of undefined (reading 'split')
    at module.exports (C:\Users\33614\AppData\Local\sfdx\node_modules\prompts\lib\util\clear.js:16:24)
    at SelectPrompt.render (C:\Users\33614\AppData\Local\sfdx\node_modules\prompts\lib\elements\select.js:123:25)
    at SelectPrompt.down (C:\Users\33614\AppData\Local\sfdx\node_modules\prompts\lib\elements\select.js:104:10)
    at ReadStream.keypress (C:\Users\33614\AppData\Local\sfdx\node_modules\prompts\lib\elements\prompt.js:32:16)
    at ReadStream.emit (node:events:525:35)
    at emitKeys (node:internal/readline/utils:357:14)
    at emitKeys.next (<anonymous>)
    at ReadStream.onData (node:internal/readline/emitKeypressEvents:64:36)
    at ReadStream.emit (node:events:525:35)
    at addChunk (node:internal/streams/readable:324:12)

Is there a workaround ?

Expected behavior

No crash :/

System

  • OS: Windows 11
  • Terminal: Git bash in VsCode , and also standalone git bash
  • Node version: 18.12.0
@herenickname
Copy link

+1 same error

@nvuillam
Copy link
Author

@herenickname I migrated to inquirer and now all is ok :)

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

2 participants