How do I debug “Error: spawn ENOENT” on node.js?

后端 未结 25 2727
轻奢々
轻奢々 2020-11-22 03:00

When I get the following error:

events.js:72
        throw er; // Unhandled \'error\' event
              ^
Error: spawn ENOENT
    at errnoException (chil         


        
25条回答
  •  悲&欢浪女
    2020-11-22 03:45

    Windows solution: Replace spawn with node-cross-spawn. For instance like this at the beginning of your app.js:

    (function() {
        var childProcess = require("child_process");
        childProcess.spawn = require('cross-spawn');
    })(); 
    

提交回复
热议问题