It looks like the next instance is being instantiated incorrectly.

Why This Error Occurred

You have passed a null or undefined parameter to the next() call.

Possible Ways to Fix It

Make sure you are passing the variables properly:

const app = next()

And make sure you're passing dev as shown in the examples below:

const app = next({ dev: boolean })

Useful Links