我正在使用 React Typescript,并且按照tRPC 文档进行服务器/客户端设置,但出现此错误。有谁知道为什么部署时会发生这种情况?我在本地使用的时候效果还好吗?
\n8:41:46 AM: TS2339: Property \'createClient\' does not exist on type \'"useContext collides with a built-in method, you should rename this router or procedure on your backend" | "Provider collides with a built-in method, you should rename this router or procedure on your backend" | "createClient collides with a built-in method, you should rename this router or procedure on your backend...\'.\n8:41:46 AM: Property \'createClient\' does not exist on type \'"useContext collides with a built-in …Run Code Online (Sandbox Code Playgroud) 我将 tRPC 与 Typescript 和 Next.js 结合使用。直到最近我的测试才失败(我认为我没有碰过它们)。我得到了错误Unexpected token 'export'。我尝试过更改我的jest.config.mjs添加transformIgnorePatterns: ["!node_modules/"]以及babel-jest
transform: {\n "^.+\\\\.tsx?$": "ts-jest",\n "^.+\\\\.(js|jsx)$": "babel-jest",\n "node_modules/variables/.+\\\\.(j|t)sx?$": "babel-jest"\n },\nRun Code Online (Sandbox Code Playgroud)\n但无济于事:(有人可以帮助我吗?这是我的错误日志。
\nTest suite failed to run\n\n Jest encountered an unexpected token\n\n Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.\n\n Out of the box Jest supports Babel, which will be used …Run Code Online (Sandbox Code Playgroud)