Readline-sync does not take input typed in powershell (windows, Ex07.js)

Hi fellow learners!

I am refreshing myself on readline-sync by executing exercise 7.js - however, the powershell won’t accept my keyboard input once the code is run.

For example: in powershell I will execute
node ex07.js
The output will be as follows:
What's your name?What's your age?What's your eye color?Your name is ${name}
Your age is ${age}
Your name is ${eye}

Right after “What’s your name?” - it opens up to allow input but I am not able to type anything in there.

Any assistance is greatly appreciated!

I believe readline-sync did not install correctly - because I do not have the folder “node_modules” under /LJSTHW

However, when I run npm install readline-sync, I get
+ readline-sync@1.4.9
updated 1 package and audited 1 package in 0.651s
found 0 vulnerabilities

Hi @leo welcome to the forum.
I had the same issue with readline sync. After some tinkering around I found out that I had more than one node instance installed (an old one and the actual one). If you’re on Linux have a look in

/usr/local/bin

And clean out all additional installs.
In my case I had to uninstall and reinstall nodejs proberly, to get readline-sync to run.

1 Like

Hey @leo, did you get this working yet? I use windows for my testing and development, so it’s been working for me, but tell me more about your compute so I can try to replicate it.