karma init throwing error on Windows
See original GitHub issueExpected behavior
We should expect to get some sort of init just like karma-cli…which is also broke on Windows
Actual behavior
`$ karma init
readline.js:526 this.line = this.line.slice(this.cursor); ^
TypeError: Cannot read property ‘slice’ of undefined at Interface._deleteLineLeft (readline.js:526:24) at suggestNextOption (C:\dev\R22788\web-app\web\node_modules\karma\lib\init\state_machine.js:43:9) at nextQuestion (C:\dev\R22788\web-app\web\node_modules\karma\lib\init\state_machine.js:119:12) at process (C:\dev\R22788\web-app\web\node_modules\karma\lib\init\state_machine.js:135:10) at Object.exports.init (C:\dev\R22788\web-app\web\node_modules\karma\lib\init.js:247:6) at Object.exports.run (C:\dev\R22788\web-app\web\node_modules\karma\lib\cli.js:249:25) at requireCliAndRun (C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:44:16) at C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:54:12 at C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:44:21 at ondir (C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:187:31) at C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:153:39 at onex (C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:93:22) at C:\Users\ufen\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:24:18 at FSReqWrap.oncomplete (fs.js:82:15) `
Enviroment Details
- Windows 7 Enterprise
- node version 5.9
- Karma version (output of
karma --version
): 0.13.22
Steps to reproduce the behaviour
- run karma init from node_modules
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top GitHub Comments
Probably you’re using the Git Bash terminal, MinTTY, which doesn’t have full support for TTY.
You have 4 options to fix the problem:
"C:\Program Files\Git\bin\bash.exe" --login -i
in cmd terminal)If you just need execute isolated interactive commands like
karma init
, I recommend option 1 for it and then come back to Git Bash. However I would give a try to Powershell.succeed in using cmd