一行抜けてました。
const m5 = require('m5stickcjs');
var obniz = new m5("XXXX-XXXX");
obniz.onconnect = async function () {
lcd = obniz.m5display;
await lcd.onWait();
lcd.setRotation(1);
let white = lcd.color16(255, 255, 255);
let blue = lcd.color16(255, 0, 0); // 本来は (0,0,255)
lcd.fillScreen(blue);
lcd.drawString(10, 20, "Hello World", white, white, 2);
};