Getting error when try to deploy next js project with next/image

I was trying to deploy a next js project using Cloudflare pages. The project uses ‘next/image’ for image optimization. But it gives me the following error.

Any suggestions will be appreciated.

Note: Other projects didn’t throw errors like this where we didn’t use the next/image.

Thank you

Your answer is in the image itself.