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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현