Next.js Discord

Discord Forum

How to use new Image(height, width) in NextJS ts

Unanswered
Greenish Elaenia posted this in #help-forum
Open in Discord
Greenish ElaeniaOP
'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.

^ this error is showing up when trying to create an image with:

'use client'
const a = new Image();

How do I resolve this error?

0 Replies