基于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
相关产品推荐
相关产品推荐

