Using nodejs's spawn causes “unknown option — ” and “[Error: spawn ENOENT]” errors

后端 未结 3 2161
北荒
北荒 2020-11-27 06:03

I\'m trying to get spawn to effect an rm -rf node_modules followed by npm install (on windows 7; nx commands courtesy of a tr

3条回答
  •  庸人自扰
    2020-11-27 06:45

    Use full path for the process, like:

    var cmd = require('child_process').spawn("C:\\windows\\system32\\cmd.exe");
    

提交回复
热议问题