我正在使用 getasync 执行一些 cmd 命令,它给了我这个错误:
Unhandled rejection RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
输出很大,但我需要它来调试底层的python脚本。有没有办法扩大maxBuffer?查看我的代码:
thecaller: function(req, callback) {
const geoJSON = req.geoJSON;
const nameofinstance = req.name;
const Promise = require("bluebird");
const cmd = require('node-cmd');
const getAsync = Promise.promisify(cmd.get, { multiArgs: true, context: cmd });
getAsync(`python3 firstscript.py`)
.then(() => getAsync(`python3 secondscript.py`))
.then(callback(nameofplanung));
问题出现在第一个“.then”