构建 React Native iOS 时出现意外的令牌名称“_000”,预期的标点符号“,”

ada*_*ng3 7 typescript react-native

我收到了,Unexpected token name \xc2\xab_000\xc2\xbb, expected punc \xc2\xab,\xc2\xbb但我的文件看起来有效?任何想法这可能是什么

\n

应用程序/服务/api/api.ts

\n
import { ApisauceInstance, create } from "apisauce"\n\n// Use this import if you want to use "env.js" file\n// const { API_URL } = require("../../config/env")\n// Or just specify it directly like this:\nconst API_URL = "http://localhost:3000/app" // update later\n\nexport class Api {\n  apisauce: ApisauceInstance\n\n  setup() {\n    this.apisauce = create({\n      baseURL: API_URL,\n      timeout: 10_000,\n      headers: {\n        Accept: "application/vnd.api+json",\n        "Content-Type": "application/vnd.api+json",\n      },\n    })\n  }\n}\n
Run Code Online (Sandbox Code Playgroud)\n
error app/services/api/api.ts: Unexpected token name \xc2\xab_000\xc2\xbb, expected punc \xc2\xab,\xc2\xbb in file app/services/api/api.ts at 27:21.\nError: Unexpected token name \xc2\xab_000\xc2\xbb, expected punc \xc2\xab,\xc2\xbb in file app/services/api/api.ts at 27:21\n    at minifyCode (/Users/cvdv/ss/mobile/node_modules/metro-transform-worker/src/index.js:99:13)\n    at transformJS (/Users/cvdv/ss/mobile/node_modules/metro-transform-worker/src/index.js:317:28)\n    at transformJSWithBabel (/Users/cvdv/ss/mobile/node_modules/metro-transform-worker/src/index.js:408:16)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Object.transform (/Users/cvdv/ss/mobile/node_modules/metro-transform-worker/src/index.js:569:12)\n
Run Code Online (Sandbox Code Playgroud)\n

Kyr*_*Kyr 24

timeout: 10_000,用。。。来代替timeout: 10000,