You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于NextJS-TypeScript+Tailwind开发时遇JSX语法报错求助

Next.js + TypeScript: "Expression expected" & "Unexpected token 'div'. Expected jsx identifier" in UseCases Component

我基于 Next.js + TypeScript + Tailwind CSS 搭建网站时,遇到了两个关联错误:

  • IDE 提示 Expression expected
  • 终端编译时提示 Unexpected token 'div'. Expected jsx identifier

错误均指向 UseCases 组件 return 语句中的 <div> 标签。我已尝试 swc#issue-2237 中的解决方案以及 Stack Overflow 上的相关方案,但问题仍未解决。


文件路径

# 替换为你的实际文件路径
src/components/UseCases.tsx

UseCases 组件代码

// 粘贴你的组件代码

tsconfig.json 配置

// 粘贴你的 tsconfig 配置内容

内容的提问来源于stack exchange,提问作者Karthik S

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 04:40:24