I think for node usage, you should add node-canvas and pass it via option object. Currently, you are not using the canvas.
const mergeImages = require('merge-images');
const { Canvas, Image } = require('canvas'); // import this
mergeImages(['./body.png', './eyes.png', './mouth.png'], {. //pass Valid images in array
Canvas: Canvas, // here you need to add canvas
Image: Image
})
.then(b64 => ...);
For sample project in Node.js, you can check here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…