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

351
Visualizações
React App: Failed to Compile. Module parse failed

enter image description here

Everytime I create React app and start the development server, I get this error. HELP!!!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Per this issue, it may be a problem with the react-scripts part of your library. So either use a specific, older version of create react app by running :

npx create-react-app@4.0.1 my-app

Or by running CRA as is, then modifying your package.json folder so that the react script version is specified.

So after you run CRA, change your package.json file like so:

{
  "name": "myapp",
  ...
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.4.0",
    "@testing-library/user-event": "^7.2.1",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-scripts": "4.0.1"           // change this line to 4.0.1
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  ...
}

Then make sure you rm -rf node_modules then run npm install to get a fresh install that removes whatever react-scripts came by default so that you use the specific 4.0.1 version.

over 4 years ago · Santiago Trujillo 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