formulahendry / formulahendry/vscode-code-runner

[Bug]

Open
#943 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

- 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'".

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.