Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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 later

export 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)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

replace timeout: 10_000, with timeout: 10000,

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading