When using commander to write commands, you need to use npm install, but you can directly execute it with child_process. As a result, the command line page process is not output. I don’t know the progress of the installation. How to solve this problem?
You first make sure you have node installed. Enter the command in cmd: node -v
If the node version is displayed, it means that node has been installed, and you can directly use the command npm install
child_process accepts a configuration parameter. If you check the documentation, you can configure stdio:'inherit', so that the install information will be output to the IO stream of the parent process