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

168
Visualizações
Why is my backend console errors giving me errors regarding my front end

Console Error image

Getting an error saying i cant use import regarding my front end code when im trying to run node index.... i havent had this issue till now when i just got back to this project.

I already have type": "module", insde my pacakage.json for my backend folder. im just a little confused why its giving me a syntax error in my backend console for code thats in my front end client folder I tried "type": "module", in my front ends package.json but then that causes issues with my front end code and wont run things.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Since react is written with JSX, you need to transpile the JSX into javascript. Trying to run a JSX file with node is going to result in an error because node will only run plain javascript. It may be a bit difficult to set up a transpiler like babel, so it is recommended that you use the create-react-app command in the terminal.

npx create-react-app nameofmy-app

and then to run the app:

npm start

This will start the build process, which will transpile your JSX into javascript, and then run a server that you can access in the browser.

After creating this new react app you will have to import your react files from your previous project directory.

about 4 years ago · Juan Pablo Isaza Relatório
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