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

259
Visualizações
Error: VM769:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

I tried today for the first time to "connect" a backend (Flask) with a frontend (React). I have a Flask server running on my localhost.

Folder structure looks like this: Ordnerstruktur

So now I have coded a mini Flask server Backend code

Afterwards I wanted to access the built-in JSON in the frontend with "fetch Frontend code

To let React know where the backend is located, I specified the connection in package.json ("proxy": "http://localhost:5000/",) Backend anbindung

according to the tutorial from which i got this code, it should work now. Unfortunately I get the error written above. Error

i tried many things i found in the internet like controling the JSON formatting and so on but everythign seems fine. i also had a problem that when i put after localhost:500/members and in the fetch also "/members" instead of "/" i got a server 500 error back. i could resolve or rather bypass by just simply put "/" in my fetch and backend code.

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