thlorenz / replpad

Pipes content of files to a node repl whenever they change to enable a highly interactive coding experience.
http://thlorenz.github.com/replpad/
MIT License
213 stars 19 forks source link

Problem with require(' #33

Open dionyziz opened 4 years ago

dionyziz commented 4 years ago

When I type require (' in the replpad command line, it crashes with the following error:

dionyziz@puppy ~/workspace/NutriDice/api (master*) % node --no-deprecation scripts/cli.js

Loading replpad config from: /Users/dionyziz/.config/replpad/config.js

Watching no files since no path was specified.

replpad v0.14.1

node v14.4.0 | puppy | 12 cpus | darwin platform | v8 v8.1.307.31-node.33 | uv v1.37.0

plugins: vim | matchtoken

If in doubt, enter .help

NutrDice> require('readline.js:1150
            throw err;
            ^

TypeError: Cannot convert undefined or null to object
    at keys (<anonymous>)
    at REPLServer.complete (repl.js:1152:24)
    at REPLServer.completer (repl.js:650:14)
    at showCompletionPreview (internal/repl/utils.js:218:10)
    at showPreview (internal/repl/utils.js:361:5)
    at REPLServer.self._ttyWrite (repl.js:883:9)
    at REPLServer.notifyingWrite (/Users/dionyziz/workspace/NutriDice/api/node_modules/readline-vim/readline-vim.js:51:23)
    at Object.self.handleInput (/Users/dionyziz/workspace/NutriDice/api/node_modules/readline-vim/lib/insert-mode.js:95:37)
    at REPLServer.rli._ttyWrite (/Users/dionyziz/workspace/NutriDice/api/node_modules/readline-vim/readline-vim.js:65:34)
    at REPLServer.rli._ttyWrite (/Users/dionyziz/workspace/NutriDice/api/node_modules/readline-matchtoken/readline-matchtoken.js:22:23)