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

ENXIO: no such device or address, open '/dev/tty' - Mac #46

Open
chadmortimer opened this issue Aug 12, 2021 · 4 comments
Open

ENXIO: no such device or address, open '/dev/tty' - Mac #46

chadmortimer opened this issue Aug 12, 2021 · 4 comments

Comments

@chadmortimer
Copy link

Using default/blank config

When calling prompt() -> Uncaught Exception ENXIO: no such device or address, open '/dev/tty' - Mac

macOS Big Sur (11.4)
node v14.15.4

@Edihan-1990
Copy link

i have this one pretty the same.

node:internal/fs/utils:348
throw err;
^

Error: ENXIO: no such device or address, open '/dev/tty'
at Object.openSync (node:fs:595:3)
at prompt (/Users/edihan/repos/Hangman_AEK/node_modules/prompt-sync/index.js:67:10)
at Object. (/Users/edihan/repos/Hangman_AEK/Hangman_AEK.js:35:24)
at Module._compile (node:internal/modules/cjs/loader:1149:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
at Module.load (node:internal/modules/cjs/loader:1027:32)
at Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
errno: -6,
syscall: 'open',
code: 'ENXIO',
path: '/dev/tty'
}

Node.js v18.10.0

@dangtony98
Copy link

I just ran into the same issue as well — Was anyone able to resolve this?

@PianoMan7
Copy link

I'm also having the same problem. Trying to create I/O tests on Replit and I'm getting the following error message:

Error: ENXIO: no such device or address, open '/dev/tty'
at Object.openSync (node:fs:585:3)
at prompt (/home/runner/Conditionals-Q2/node_modules/prompt-sync/index.js:67:10)
at Object. (/home/runner/Conditionals-Q2/index.js:5:13)
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)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)

@throttlehead-dev
Copy link

Putting down a marker here if anyone encounters this on non-interactive environments, which in my case i was accidentally running a build script that prompted for user input in my aws CodeBuild project. This likely arises when using the library in such environment and it dies because there is nothing to prompt.

Update your script to ignore the prompt call in a non-interactive environment.

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

5 participants