this.stack.push(layer);
^
TypeError: Cannot read property ‘push’ of undefined
const routers = require(‘express’).Router;
change to below
const routers = require(‘express’).Router();
this.stack.push(layer);
^
TypeError: Cannot read property ‘push’ of undefined