我正在使用create-react-app-typescript工具构建一个react应用程序 . 我已经能够通过运行该工具并按照说明构建2个测试应用程序 . 现在突然我运行 npm start 我收到此错误:

error TS2304: Cannot find name 'require'.

但我已经导入了我的类型 . 这是我的node_modules / @ types文件夹:
enter image description here

这是产生此错误的行:

const logo = require('./logo.svg');

编译器无法解析 resolve simple . 我会再说一遍:直到几个小时前它才开始工作 .

对于这个工具,我可能还有一些事情没有做到 create-react-app-typescript . 任何帮助和任何建议将不胜感激 .