Skip to main content

All Questions

Tagged with
0 votes
0 answers
23 views

Removing [stdin] keypress listener (or going around) from 3rd party app within plugin/extension (Vitest in this case)

I am writing Vitest reporter, when running tests in watch mode there is an active listener on keypress event on stdin. I want to have my own handling of user interaction, and this one pretty ...
Jarek's user avatar
  • 7,651
1 vote
1 answer
162 views

how can i send the backspace key to stdin?

I'm creating a Node.js application in Linux that spawns a child process, bash, when someone connects to the server via WebSocket. It sends all data sent through the WebSocket to stdin and sends all ...
eac's user avatar
  • 111
0 votes
2 answers
78 views

Standard input problem with typescript node

I needed to create a script that takes from the standard input, and waits until it does not get the user input, and then goes on according to what the user did. This is the code I have written so far: ...
Matteo Possamai's user avatar
1 vote
0 answers
34 views

Unable to push newline to nodejs child process

I'm trying to run a command on my terraria server via nodejs const { spawn } = require("child_process"); const server = spawn( "dotnet", [ "tModLoader.dll", &...
Trumpas's user avatar
  • 11
1 vote
3 answers
458 views

Why do shell scripts not behave the same when called from node.js?

My problem I have a simple sh script that behaves exactly as I want, unless it's called from a node.js script. What the sh script is supposed to do Convert the (potentially binary) data passed via ...
Forivin's user avatar
  • 15.2k
0 votes
0 answers
92 views

Process attach multiple stdins

I have one process, which can receive two stdin's this.child = child_process.spawn( 'command', [ '-', 'pipe:3' ], { 'stdio' => [null, null, null, ???unknown] } ); this.child.stdin....
Michael's user avatar
  • 321
0 votes
0 answers
156 views

How to get multi keys event in Node.js terminal app?

I'm trying to read the keyboard input in a Node.js terminal application. Currently, I can only read 1 key each time with some code like this: process.stdin.setRawMode(true); process.stdin.on('data', ...
Bawbak's user avatar
  • 105
0 votes
1 answer
65 views

Interract with a .exe program with js instead of typing in the program

Hello I'm tryna make a Skyrim server Dashboard. The server look like this => On this server i can type some command like this => when I manualy wrote /help and it show the output. I tried to ...
Adlan Bousehaba's user avatar
0 votes
1 answer
141 views

Trigger Node stdin data event every time a key is pressed?

I am aware this is possible with readline, but I'd like to do it natively to understand how readline does it. Currently when I do process.stdin.on('data') it runs the callback every time I press enter....
Daavee18's user avatar
  • 152
0 votes
2 answers
202 views

STDIN process and SOCKETS.IO

I have a stream of decoded metadata coming from my local Node-Express server with the following code: process.stdin.on('data', function (data) { const result = klv.decode(data, standards, null, { ...
Dimitrios Fkiaras's user avatar
0 votes
1 answer
475 views

Node script to run external command requiring user input

I'm trying to write a node script that is able to run an external command that has two layers of user input. const conf = spawn('my command', {shell: true}); conf.stdout.on('data', (data) => { ...
Jorge Guerreiro's user avatar
0 votes
1 answer
501 views

Python-shell for Node.js

I am trying to get use a python script within my node.js application using the NPM package python-shell. I can run the script from command line using this format on Mac OS. python3 myScript.py < ...
jjlittle's user avatar
0 votes
1 answer
391 views

how to fix error Uncaught ReferenceError: require is not defined from readline function

I want to use the readline function to get input. But when using this function, this error is displayed. What is the problem? enter image description here const readline = require("readline")...
samaneh rajaee's user avatar
1 vote
1 answer
2k views

Capturing the *complete* output stream of a child_process in NodeJS

I've been trying to capture the output of a child_process for a while now. The following code example is my current attempt. Code: // Spawning a shell var terminal = require('child_process').spawn(`sh`...
santcleep's user avatar
0 votes
2 answers
3k views

python-shell node, keep a python script running

Would anyone know when using python-shell if you can keep the python script running when its called from Javascript? Maybe call a method from a Python class from Javascript using python-shell? For ...
bbartling's user avatar
  • 3,390

15 30 50 per page
1
2 3 4 5
12