Problem Description
Current Mongosh Log ID: 60870e2c903b776156b944dc Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000 Using MongoDB: 5.0.0-alpha-257-ga73671c Using Mongosh Beta: 0.12.0 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting: 2021-04-26T08:37:02.591-07:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted ------ Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded. You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js. Enterprise repl0 [direct: primary]> Enterprise repl0 [direct: primary]> readline.js:1154 throw err; ^ TypeError: Cannot read property 'startsWith' of undefined at PrettyREPLServer.Interface._historyPrev (readline.js:701:34) at PrettyREPLServer.Interface._ttyWrite (readline.js:1048:14) at PrettyREPLServer.REPLServer.self._ttyWrite (repl.js:907:9) at LineByLineInput.onkeypress (readline.js:213:10) at LineByLineInput.emit (events.js:315:20) at LineByLineInput.EventEmitter.emit (domain.js:467:12) at emitKeys (internal/readline/utils.js:345:14) at emitKeys.next (<anonymous>) at LineByLineInput.onData (readline.js:1144:36) at LineByLineInput.emit (events.js:315:20)
Steps to Reproduce
- start mongosh
- Do not type any text and press enter.
- Press the up arrow.
- mongosh crashes with "TypeError: Cannot read property 'startsWith' of undefined"
Expected Results
mongosh should not crash.
Additional Notes
This my first time ever launching mongosh on this system. After I actually execute one line of code, this error goes away.