Skip to content
FLAVIO COPES
flaviocopes.com

Fix 'Constructor requires new operator' in Next.js

By

Fix the Next.js TypeError Constructor requires 'new' operator, which usually means you used the next/image Image component without importing it at the top.

~~~

I got this error while working with Next.js:

TypeError: Constructor requires 'new' operator

Turns out I used the <Image /> component provided by next/image but I forgot to import it on top:

import Image from 'next/image'

It can be tricky especially if you are moving some JSX around components.

Tagged: Next.js · All topics
~~~

Related posts about next: