Doesn't work with readline on Windows
See original GitHub issue- Versions:
node@v14.15.4, win32@10.0.19042 nodemon -v:2.0.7- Operating system/terminal environment (powershell, gitshell, etc): Windows 10. win32 x64
cmd.exe - Using Docker? What image: N/A
- Command you ran:
nodemon app.js
Steps to reproduce
app.js
const readline = require('readline');
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
rl.question('Enter anything: ', (answer) => {
console.log(answer);
rl.close();
});
nodemon app.js
Enter text and press enter.
Expected behaviour
App should exit.
Enter anything: a
a
[nodemon] clean exit - waiting for changes before restart
Actual behaviour
App does not exit, continually displays input text. Must exit with Ctrl+C.
Enter anything: a
a
a
b
c
d
If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens. (Some sections redacted with xxx)
--------------
node: v14.15.4
nodemon: 2.0.7
command: xxx\node.exe xxx\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js app.js --dump
cwd: xxx
OS: win32 x64
--------------
{
run: false,
system: { cwd: 'xxx' },
required: false,
dirs: [ 'xxx' ],
timeout: 1000,
options: {
dump: true,
ignore: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**',
re: /.*.*\/\.git\/.*.*|.*.*\/\.nyc_output\/.*.*|.*.*\/\.sass\-cache\/.*.*|.*.*\/bower_components\/.*.*|.*.*\/coverage\/.*.*|.*.*\/node_modules\/.*.*/
],
watch: [ '*.*', re: /.*\..*/ ],
monitor: [
'*.*',
'!**/.git/**',
'!**/.nyc_output/**',
'!**/.sass-cache/**',
'!**/bower_components/**',
'!**/coverage/**',
'!**/node_modules/**'
],
ignoreRoot: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**'
],
restartable: 'rs',
colours: true,
execMap: { py: 'python', rb: 'ruby', ts: 'ts-node' },
stdin: true,
runOnChangeOnly: false,
verbose: false,
signal: 'SIGUSR2',
stdout: true,
watchOptions: {},
execOptions: {
script: 'app.js',
exec: 'node',
args: [],
scriptPosition: 0,
nodeArgs: undefined,
execArgs: [],
ext: 'js,mjs,json',
env: {}
}
},
load: [Function (anonymous)],
reset: [Function: reset],
lastStarted: 0,
loaded: [],
watchInterval: null,
signal: 'SIGUSR2',
command: {
raw: { executable: 'node', args: [ 'app.js' ] },
string: 'node app.js'
}
}
--------------
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
python's readline module not available for windows?
I have recently faced the same issue on Windows 10. readline is not available for Windows, however there is pyreadline3 (a continuation of ......
Read more >There's no readline module on Windows Python (cmd.Cmd)
> The Windows cmd implementation clearly uses readline or > some compatible lib under the hood The REPL shell and input() call PyOS_Readline()....
Read more >Readline for Windows - GnuWin32
The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are...
Read more >Using Readline In Python REPL On Windows With ...
Use PyReadline and PtPython to have the powerful Readline in Python REPL on Windows OS.
Read more >import readline is failing · Issue #394 · 3b1b/manim - GitHub
I am trying to run examples_scenes.py and it threw a ModuleNotFoundError when it tried to import readline. This should be easy to resolve ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Any reason why you’re not using
--no-stdinflag, as pernodemon --help options?Because I get this:
@remy alluding to the fact that
--no-stdinis required in this case explains it well enough for me. Thanks!