Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

208
Visualizações
Trying to get a react-app that's not mine to work which cannot find a localhost url

I have a react app that isn't mine (a former employee) and I'm still quite new to react. I need to get the app to work so it retrieves data from a SQL database. At the moment the app can't find a request URL from itself called http://localhost//FleetManagement//Api/Default.aspx?method=GetCustomers

The react app gives the following error:

enter image description here

Or in text:

SyntaxError: Unexpected end of JSON input
(anonymous function)
C:/CodeRacvsolar/react-app/src/App.tsx:201
  198 | 
  199 | api.getCustomers(
  200 |   (req: XMLHttpRequest) => {
> 201 |     let getCustomersResponse: interfaces.GetCustomersResponse = JSON.parse(req.responseText);
  202 | ^
  203 |     this.setState({
  204 |       data: getCustomersResponse,
View compiled

XMLHttpRequest.req.onreadystatechange
C:/CodeRacvsolar/react-app/src/api/api.tsx:54
  51 | 
  52 |        if (req.readyState === XMLHttpRequest.DONE) { 
  53 |            if (onComplete) {
> 54 |                onComplete(req)
  55 | ^          }
  56 |        }
  57 |        
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda