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

