It is possible to get the progress of a spawned process from nodejs? The Next CEO of Stack OverflowShow progress on node.js child_process.exec?Show progressbar of python script execution with nodejsGetting the progress output of a child spawned process from nodejsHow to get the value from the GET parameters?Get selected text from a drop-down list (select box) using jQueryHow to decide when to use Node.js?Is there a way to get version from package.json in nodejs code?jQuery Get Selected Option From DropdownSpawn and kill a process in node.jsNodejs forked child process exits immediately with status code 8How to execute code after a spawned, detached, child exits from NodeJSnpm - using stale package dataHow to solve “npm does not support Node.js v11.3.0” warning after upgrading NodeJs 11 from NodeJs 8?

Is there a difference between "Fahrstuhl" and "Aufzug"

Poetry, calligrams and TikZ/PStricks challenge

Is a distribution that is normal, but highly skewed considered Gaussian?

Would a completely good Muggle be able to use a wand?

TikZ: How to reverse arrow direction without switching start/end point?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Is it professional to write unrelated content in an almost-empty email?

Flying from Cape Town to England and return to another province

Does soap repel water?

Can this equation be simplified further?

How did people program for Consoles with multiple CPUs?

Why do airplanes bank sharply to the right after air-to-air refueling?

Won the lottery - how do I keep the money?

Is wanting to ask what to write an indication that you need to change your story?

Why the difference in type-inference over the as-pattern in two similar function definitions?

Do I need to write [sic] when a number is less than 10 but isn't written out?

Why did CATV standarize in 75 ohms and everyone else in 50?

Is it ever safe to open a suspicious HTML file (e.g. email attachment)?

Why didn't Khan get resurrected in the Genesis Explosion?

Calculator final project in Python

Chain wire methods together in Lightning Web Components

Can you be charged for obstruction for refusing to answer questions?

Easy to read palindrome checker

Why do remote US companies require working in the US?



It is possible to get the progress of a spawned process from nodejs?



The Next CEO of Stack OverflowShow progress on node.js child_process.exec?Show progressbar of python script execution with nodejsGetting the progress output of a child spawned process from nodejsHow to get the value from the GET parameters?Get selected text from a drop-down list (select box) using jQueryHow to decide when to use Node.js?Is there a way to get version from package.json in nodejs code?jQuery Get Selected Option From DropdownSpawn and kill a process in node.jsNodejs forked child process exits immediately with status code 8How to execute code after a spawned, detached, child exits from NodeJSnpm - using stale package dataHow to solve “npm does not support Node.js v11.3.0” warning after upgrading NodeJs 11 from NodeJs 8?










1















I'm spawning npm install -g create-react-app from a js script. I want to know if it's possible to get the progress of the installation using spawn.



const npmExecutable = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const npm = spawn(npmExecutable, ["install", "-g", "create-react-app"]);


I have read this question about using:



npm.on("message", data => 
console.log(`A message: $data`);
);


but it does not show anything.



There is a related question, about knowing the progress of a python script, but it does not have any answers.



Does someone of you have tried something like that or know any clue about this?










share|improve this question

















  • 2





    You probably want to use npm.stdout.on('data', ...). The child_process.on('message', ...) event is for a process with an IPC channel, which is generally a child process created using child_process.fork(...).

    – Jake Holzinger
    Mar 21 at 18:19











  • Oh thanks. Now I can read the data, but what it shows is the final output from the npm command, and not the progress of the execution of the command indeed, and that is what I really need.

    – robe007
    Mar 21 at 19:24












  • You will need to process the output of the program to determine it's progress, there is no built in progress monitor for a process.

    – Jake Holzinger
    Mar 21 at 19:25











  • Yes, but ... what you mean by saying: process the output of the program to determine it's progress ?

    – robe007
    Mar 21 at 19:27












  • According to the npm config documentation you can listen to stderr to get the progress information. It says that stderr must be a TTY, I don't know what that means or how to parse the data, but that is where you will want to look.

    – Jake Holzinger
    Mar 22 at 0:37
















1















I'm spawning npm install -g create-react-app from a js script. I want to know if it's possible to get the progress of the installation using spawn.



const npmExecutable = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const npm = spawn(npmExecutable, ["install", "-g", "create-react-app"]);


I have read this question about using:



npm.on("message", data => 
console.log(`A message: $data`);
);


but it does not show anything.



There is a related question, about knowing the progress of a python script, but it does not have any answers.



Does someone of you have tried something like that or know any clue about this?










share|improve this question

















  • 2





    You probably want to use npm.stdout.on('data', ...). The child_process.on('message', ...) event is for a process with an IPC channel, which is generally a child process created using child_process.fork(...).

    – Jake Holzinger
    Mar 21 at 18:19











  • Oh thanks. Now I can read the data, but what it shows is the final output from the npm command, and not the progress of the execution of the command indeed, and that is what I really need.

    – robe007
    Mar 21 at 19:24












  • You will need to process the output of the program to determine it's progress, there is no built in progress monitor for a process.

    – Jake Holzinger
    Mar 21 at 19:25











  • Yes, but ... what you mean by saying: process the output of the program to determine it's progress ?

    – robe007
    Mar 21 at 19:27












  • According to the npm config documentation you can listen to stderr to get the progress information. It says that stderr must be a TTY, I don't know what that means or how to parse the data, but that is where you will want to look.

    – Jake Holzinger
    Mar 22 at 0:37














1












1








1


1






I'm spawning npm install -g create-react-app from a js script. I want to know if it's possible to get the progress of the installation using spawn.



const npmExecutable = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const npm = spawn(npmExecutable, ["install", "-g", "create-react-app"]);


I have read this question about using:



npm.on("message", data => 
console.log(`A message: $data`);
);


but it does not show anything.



There is a related question, about knowing the progress of a python script, but it does not have any answers.



Does someone of you have tried something like that or know any clue about this?










share|improve this question














I'm spawning npm install -g create-react-app from a js script. I want to know if it's possible to get the progress of the installation using spawn.



const npmExecutable = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const npm = spawn(npmExecutable, ["install", "-g", "create-react-app"]);


I have read this question about using:



npm.on("message", data => 
console.log(`A message: $data`);
);


but it does not show anything.



There is a related question, about knowing the progress of a python script, but it does not have any answers.



Does someone of you have tried something like that or know any clue about this?







javascript node.js npm npm-install child-process






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 21 at 18:00









robe007robe007

1,17421539




1,17421539







  • 2





    You probably want to use npm.stdout.on('data', ...). The child_process.on('message', ...) event is for a process with an IPC channel, which is generally a child process created using child_process.fork(...).

    – Jake Holzinger
    Mar 21 at 18:19











  • Oh thanks. Now I can read the data, but what it shows is the final output from the npm command, and not the progress of the execution of the command indeed, and that is what I really need.

    – robe007
    Mar 21 at 19:24












  • You will need to process the output of the program to determine it's progress, there is no built in progress monitor for a process.

    – Jake Holzinger
    Mar 21 at 19:25











  • Yes, but ... what you mean by saying: process the output of the program to determine it's progress ?

    – robe007
    Mar 21 at 19:27












  • According to the npm config documentation you can listen to stderr to get the progress information. It says that stderr must be a TTY, I don't know what that means or how to parse the data, but that is where you will want to look.

    – Jake Holzinger
    Mar 22 at 0:37













  • 2





    You probably want to use npm.stdout.on('data', ...). The child_process.on('message', ...) event is for a process with an IPC channel, which is generally a child process created using child_process.fork(...).

    – Jake Holzinger
    Mar 21 at 18:19











  • Oh thanks. Now I can read the data, but what it shows is the final output from the npm command, and not the progress of the execution of the command indeed, and that is what I really need.

    – robe007
    Mar 21 at 19:24












  • You will need to process the output of the program to determine it's progress, there is no built in progress monitor for a process.

    – Jake Holzinger
    Mar 21 at 19:25











  • Yes, but ... what you mean by saying: process the output of the program to determine it's progress ?

    – robe007
    Mar 21 at 19:27












  • According to the npm config documentation you can listen to stderr to get the progress information. It says that stderr must be a TTY, I don't know what that means or how to parse the data, but that is where you will want to look.

    – Jake Holzinger
    Mar 22 at 0:37








2




2





You probably want to use npm.stdout.on('data', ...). The child_process.on('message', ...) event is for a process with an IPC channel, which is generally a child process created using child_process.fork(...).

– Jake Holzinger
Mar 21 at 18:19





You probably want to use npm.stdout.on('data', ...). The child_process.on('message', ...) event is for a process with an IPC channel, which is generally a child process created using child_process.fork(...).

– Jake Holzinger
Mar 21 at 18:19













Oh thanks. Now I can read the data, but what it shows is the final output from the npm command, and not the progress of the execution of the command indeed, and that is what I really need.

– robe007
Mar 21 at 19:24






Oh thanks. Now I can read the data, but what it shows is the final output from the npm command, and not the progress of the execution of the command indeed, and that is what I really need.

– robe007
Mar 21 at 19:24














You will need to process the output of the program to determine it's progress, there is no built in progress monitor for a process.

– Jake Holzinger
Mar 21 at 19:25





You will need to process the output of the program to determine it's progress, there is no built in progress monitor for a process.

– Jake Holzinger
Mar 21 at 19:25













Yes, but ... what you mean by saying: process the output of the program to determine it's progress ?

– robe007
Mar 21 at 19:27






Yes, but ... what you mean by saying: process the output of the program to determine it's progress ?

– robe007
Mar 21 at 19:27














According to the npm config documentation you can listen to stderr to get the progress information. It says that stderr must be a TTY, I don't know what that means or how to parse the data, but that is where you will want to look.

– Jake Holzinger
Mar 22 at 0:37






According to the npm config documentation you can listen to stderr to get the progress information. It says that stderr must be a TTY, I don't know what that means or how to parse the data, but that is where you will want to look.

– Jake Holzinger
Mar 22 at 0:37













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55286601%2fit-is-possible-to-get-the-progress-of-a-spawned-process-from-nodejs%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55286601%2fit-is-possible-to-get-the-progress-of-a-spawned-process-from-nodejs%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript