NodeJS child_process.spawn stdout 删除进度条(stdio“继承”不符合要求)

问题描述 投票:0回答:0

我在做什么: 我创建了一个 API 端点,通过

npx create-react-app projectname
NodeJS
模块
child_process
函数执行
spawn
。效果完美。

此外,我还创建了另一个 API 端点,它可以根据需要

fetch
上述 API 的
current progress
。我已经设法从
stdout
获取
spawned child
文本并保存它。当调用 API 时,我将返回最新保存的标准输出。

Example of The stdout text used as progress updates

(1) 在 C:\xampp\htdoc 中创建一个新的 React 应用程序

node.js stdout updates progress spawn
© www.soinside.com 2019 - 2024. All rights reserved.