Reactjs react脚本导致TypeScript尝试查找要导入的错误文件

Reactjs react脚本导致TypeScript尝试查找要导入的错误文件,reactjs,typescript,relayjs,relay,Reactjs,Typescript,Relayjs,Relay,我使用React,我还使用Relay生成我的应用程序包含的一些TypeScript文件,在更改生成这些文件的目录后,TypeScript抱怨找不到它们,但有点奇怪 例如,TypeScript编译器就是这么说的: > react-scripts build Creating an optimized production build... .\src\pages\MyAccount.tsx Cannot find file './__generated__/MyAccountMutatio

我使用React,我还使用Relay生成我的应用程序包含的一些TypeScript文件,在更改生成这些文件的目录后,TypeScript抱怨找不到它们,但有点奇怪

例如,TypeScript编译器就是这么说的:

> react-scripts build
Creating an optimized production build...

.\src\pages\MyAccount.tsx
Cannot find file './__generated__/MyAccountMutation.graphql' in '.\src\pages'.


error Command failed with exit code 1.
没错,没有/src/pages/\uuuuu生成的\uuuuu/MyAccountMutation.graphql,但是MyAccount.tsx不需要该文件。导入行为:

import {MyAccountMutation} from "../__generated__/MyAccountMutation.graphql"
这是正确的,存在一个/src/pages/././.\uuuu生成的/uuuu/MyAccountMutation.graphql,即/src/.\uu生成的/uuuu/MyAccountMutation.graphql

运行tsc工作正常。React development server也会出现此问题

你知道为什么React/TypeScript会尝试获取错误的文件吗