Cannot read property 'slice' of undefined
See original GitHub issueOliverSalzburg@Oliver-PC MINGW64 ~/Projects/absync (dev)
$ karma init karma.conf.js
> readline.js:525
this.line = this.line.slice(this.cursor);
^
TypeError: Cannot read property 'slice' of undefined
at Interface._deleteLineLeft (readline.js:525:24)
at suggestNextOption (C:\Users\Oliver\Projects\absync\node_modules\karma\lib\init\state_machine.js:43:9)
at nextQuestion (C:\Users\Oliver\Projects\absync\node_modules\karma\lib\init\state_machine.js:119:12)
at process (C:\Users\Oliver\Projects\absync\node_modules\karma\lib\init\state_machine.js:135:10)
at Object.exports.init (C:\Users\Oliver\Projects\absync\node_modules\karma\lib\init.js:247:6)
at Object.exports.run (C:\Users\Oliver\Projects\absync\node_modules\karma\lib\cli.js:237:25)
at requireCliAndRun (C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:44:16)
at C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:54:12
at C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:44:21
at ondir (C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:187:31)
at C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:153:39
at onex (C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:93:22)
at C:\Users\Oliver\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:24:18
at FSReqWrap.oncomplete (fs.js:82:15)
I just installed karma and tried to init a new configuration. Seems to be a problem with MINGW. The command works in the default Command Prompt.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:21 (3 by maintainers)
Top Results From Across the Web
Problem with error Cannot read property 'slice' of undefined
I faced the same error today, and solved it by initializing the array to an empty array before performing any slice ...
Read more >Cannot read property 'slice' of undefined error when trying to ...
Hi guys, As the title says, I am getting a Cannot read property 'slice' of undefined error in the console when trying to...
Read more >TypeError: Cannot read property 'slice' of undefined - Support
Hello, I encountered the same problem with the new version solc compiler. Error:
Read more >TypeError: Cannot read property 'slice' of undefined - MongoDB
So you can not retrieve that token because there is no Header so there is undefined variable. You are trying to slice that...
Read more >Cannot read property 'slice' of undefined version in new project
js): TypeError: Cannot read property 'slice' of undefined at throwVersionError (node_modules/@babel/helper-plugin-utils/lib/index.js:62:15) at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround that works nicely in GIT BASH shell is to call it directly using node
node node_modules/karma/bin/karma init
I could ran this command (
karma init
) in windows using windows command line instead of MINGW.