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

React学习遇TS报错:找不到TodoOutput.module.scss模块或类型声明

React导入SCSS模块报错问题

我刚开始学习React,在TodoOutput.tsx中导入./TodoOutput.module.scss样式时出现错误,错误信息如下:

Cannot find module ./TodoOutput.module.scss or its corresponding type declarations.ts(2307)

尽管TodoOutput.module.scss文件实际存在,且scss和sass包已添加到package.json与package-lock.json中。

TodoOutput/目录结构截图:
目录截图

相关配置文件包括:

  • package.json
  • package-lock.json
  • tsconfig.json

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.22 11:17:01