nextjs-fix-constructor-requires-new-operator

Next.js中如何修复“Constructor requires ’new’ operator”错误 在使用Next.js过程中,我遇到了以下错误: TypeError: Constructor requires 'new' operator 原来是我使用了next/image提供的<Image />组件,但我忘记在顶部导入它: import Image from 'next/image' 如果你在组件之间移动JSX,可能会很棘手。