Здравствуйте, есть такой код:
const duplexer2 = require('duplexer2');
const { spawn } = require('child_process');
module.exports = function(cmd, args){
const command = spawn(cmd, args);
var duplex = duplexer2(process.stdin, process.stdout);
}
Выводит такую ошибку:
/usr/local/lib/node_modules/stream-adventure/lib/exportFnExercise.js:32
this.submissionChild.stdin = this.submissionChild
^
TypeError: Cannot set property 'stdin' of undefined
at Exercise.<anonymous> (/usr/local/lib/node_modules/stream-adventure/lib/exportFnExercise.js:32:30)
at next (/usr/local/lib/node_modules/stream-adventure/node_modules/workshopper-exercise/exercise.js:170:19)
at Exercise.process (/usr/local/lib/node_modules/stream-adventure/node_modules/workshopper-exercise/exercise.js:177:5)
at Exercise.<anonymous> (/usr/local/lib/node_modules/stream-adventure/node_modules/workshopper-exercise/exercise.js:147:10)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
В чём может быть проблема?
Решаю задачу по stream-adventure
Гуглил ничего не нашёл похожего