learnyounode icon indicating copy to clipboard operation
learnyounode copied to clipboard

Error: Cannot switch to old mode now. When try to run learnyounode

Open gsambrotta opened this issue 9 years ago • 7 comments

Hi. I just install learnyounode workshop with command:

npm install -g learnyounode

but as soon as I run learnyounode i got this error:


_stream_readable.js:748
throw new Error('Cannot switch to old mode now.');
^
Error: Cannot switch to old mode now.
at emitDataEvents (_stream_readable.js:748:11)
at ReadStream.Readable.resume (_stream_readable.js:733:3)
at showMenu (/usr/local/lib/node_modules/learnyounode/node_modules/workshopper/menu.js:90:17)
at showMenu (/usr/local/lib/node_modules/learnyounode/node_modules/workshopper/exerciseMenu.js:29:10)
at Workshopper.printMenu (/usr/local/lib/node_modules/learnyounode/node_modules/workshopper/workshopper.js:355:14)
at new Workshopper (/usr/local/lib/node_modules/learnyounode/node_modules/workshopper/workshopper.js:180:8)
at Workshopper (/usr/local/lib/node_modules/learnyounode/node_modules/workshopper/workshopper.js:22:12)
at Object. (/usr/local/lib/node_modules/learnyounode/learnyounode.js:11:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)```

Seems this bug happen just on node version  < 0.12

gsambrotta avatar Apr 13 '15 13:04 gsambrotta

Fixing it as we speak.

martinheidegger avatar Apr 13 '15 13:04 martinheidegger

:D awesome!

gsambrotta avatar Apr 13 '15 13:04 gsambrotta

:balloon:

finnp avatar Apr 14 '15 12:04 finnp

waiting on publishing of @rvagg

martinheidegger avatar Apr 14 '15 12:04 martinheidegger

same probleme here :(

Monitob avatar Apr 15 '15 10:04 Monitob

I've had the same problem but as it states in the bug report itself, it happens only for versions below 0.12. So I've updated my node.js to 0.12.2 (latest stable) and everything is ok now.

betasve avatar Apr 15 '15 12:04 betasve

I can confirm what betasve said. Same issue, node just needed an upgrade. This link helped:

http://davidwalsh.name/upgrade-nodejs

strangeBird3 avatar Apr 15 '15 14:04 strangeBird3