My problem was missing parentheses:
const router = require('express').Router;
Changing this to
const router = require('express').Router();
solved my problem.
My problem was missing parentheses:
const router = require('express').Router;
Changing this to
const router = require('express').Router();
solved my problem.