ada*_*ng3 7 typescript react-native
我收到了,Unexpected token name \xc2\xab_000\xc2\xbb, expected punc \xc2\xab,\xc2\xbb
但我的文件看起来有效?任何想法这可能是什么
应用程序/服务/api/api.ts
\nimport { 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)\nerror 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
归档时间: |
|
查看次数: |
1640 次 |
最近记录: |