Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Unexpected token name «_000», expected punc «,» when building react native iOS

$
0
0

I'm getting a Unexpected token name «_000», expected punc «,» but my file looks valid? Any ideas what this could be

app/services/api/api.ts

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

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>