node.js - How to write npm install command in node?
習慣沉默
習慣沉默 2017-06-22 11:54:25
0
2
862

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?

習慣沉默
習慣沉默

reply all(2)
typecho

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template