index. js file
R("message.R")
.data("hello world", 20)
.call(function(err, d) {
if (err) console.log('err:', err);
console.log('hiiii:', d);
});
message.R file
Print('ankit is here')
В командной строке при запуске node index.js
появляется сообщение об ошибке Rscript ENOENT
событий. js: 174 throw er; // Необработанное событие 'error' ^
Ошибка: порождает Rscript ENOENT в Process.ChildProcess._handle.onexit (internal / child_process. js: 240: 19) в onErrorNT (internal / child_process. js: 415: 16) в process._tickCallback (внутренний / process / next_tick. js: 63: 19) в Function.Module.runMain (внутренний / modules / cjs / loader. js: 834: 11) при запуске (внутренняя / bootstrap / node.js: 283: 19) в bootstrapNodeJSCore (внутренняя / bootstrap / node.js: 623: 3) отправила событие «error» в: at Process.ChildProcess._handle.onexit (internal / child_process. js: 246: 12) в onErrorNT (внутренняя / child_process. js: 415: 16) [... строки, соответствующие исходной трассировке стека ...] в bootstrapNodeJSCore (внутренняя / bootstrap / node.js: 623: 3 )