Open lordlycastle opened 3 years ago
@lordlycastle Which node version do you use?
@kpman see below.
├── trymodule@1.4.0
❯ node --version && npm --version
v15.10.0
7.7.6
I just ran into this. :[
$ trymodule file-size
Gonna start a REPL with packages installed and loaded for you
Couldn't find 'file-size' locally, gonna download it now
file-size@1.0.0 ../../../.trymodule/node_modules/file-size
Package 'file-size' was loaded and assigned to 'file_size' in the current scope
REPL started...
/Users/z/.npm-global/lib/node_modules/trymodule/node_modules/repl.history/index.js:19
repl.rli.addListener('line', function(code) {
^
TypeError: Cannot read properties of undefined (reading 'addListener')
at module.exports (/Users/z/.npm-global/lib/node_modules/trymodule/node_modules/repl.history/index.js:19:12)
at /Users/z/.npm-global/lib/node_modules/trymodule/cli.js:72:7
at processTicksAndRejections (node:internal/process/task_queues:96:5)
~/git/replicate/replicate-web main*
$ node --version
v16.9.0
This issue is related with repl.history
which is used in this module.
The node's repl
API (REPLServer.rli) changed after Node 16.
The repl.rli.addListener
should be replaced with repl.addListener
.
I get this error when I try to run anything e.g.
trymodule lodash
:I've done basic clean up steps i.e. uninstall
trymodule
and delete the~/.trymodule/
folder (ortrymodule --clear
).I don't understand why it fails here.