Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] #943

Open
a-dom88 opened this issue May 9, 2022 · 0 comments
Open

[Bug] #943

a-dom88 opened this issue May 9, 2022 · 0 comments

Comments

@a-dom88
Copy link

a-dom88 commented May 9, 2022

  • VS Code Version: 1.66.2
  • OS Version: MacOs Monterey 12.3.1
  • Code Runner Version: 0.11.7

Describe the bug
Hi,
i don't know if it's actually a bug but i get a massage of error when i try to run a readline-sync command.
since CodeRunner works fine with everything else, i thought that this issue might be a bug.
i'm trying to figure out if it's a configuration problem on my computer or not, but i can't find anything about this type of error.
thank you in advance.

ps: as you may have noticed, i'm still a newbye.

To Reproduce
Steps to reproduce the behavior:

  1. i created a new project folder
  2. i set the npm folder inside of it
  3. i created a new file (test.js)
  4. i wrote this code : var readline = require("readline-sync");
    var name;
    name = readline.question("Write your name here: ");
    console.log("Hello, " +name)

Actual behavior
here is the error message:

[Running] node "/Users/alessandro/repos/Javascript/test.js"
stty: /dev/tty: Device not configured
/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured
stty: /dev/tty: Device not configured
/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:259
if (res.error) { throw res.error; }
^

Error: The current environment doesn't support interactive reading from TTY.
stty: /dev/tty: Device not configured
/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured
stty: /dev/tty: Device not configured
at readlineExt (/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:221:19)
at tryExt (/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:258:15)
at /Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:363:15
at _readlineSync (/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:433:5)
at getValidLine (/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:775:11)
at Object.exports.question (/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/readline-sync.js:857:10)
at Object. (/Users/alessandro/repos/Javascript/test.js:3:17)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
method: 'execFileSync',
program: '/bin/sh',
args: [
'/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/read.sh',
'--display',
'Inserisci#32;il#32;tuo#32;nome#58;#32;',
'--mask',
'#42;'
],
extMessage: 'stty: /dev/tty: Device not configured\n' +
'/Users/alessandro/repos/Javascript/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured\n' +
'stty: /dev/tty: Device not configured',
exitCode: 1,
code: undefined,
signal: null
}

Expected behavior
it should ask me my name and then it should say "Hello, 'myname'".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant