To Solve TypeError: Cannot read properties of undefined (reading 'prototype') Error You Need to instantiate express in this way. And also app as well: const express = require('express'); const app = express(); Now, Your error must be solved.