繁体   English   中英

当nodejs尝试执行shell脚本时发生错误

[英]error happens when nodejs tries to exec a shell script

代码在这里:

var sys = require('sys');
var exec = require('child_process').exec;
exec('sh  ~/public/markdoc/depoly.sh', function(error, stdout, stderr) {
    sys.puts(stdout);
    if (error != null) {
        console.log(error);
    }
});

给出错误:

{ [Error: Command failed: sh: /home/users/zhangxuan06/public/markdoc/depoly.sh: No such file or directory
] killed: false, code: 127, signal: null }

有人可以告诉我为什么吗? 大Thx〜

您编写了depoly ,但您可能打算deploy

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM