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

158
Visualizações
ERROR in Module.createRequire is not a function

I tried to create react app with node version 12.1.0 but it warned me that my minimum node version should be at least 14.0. I used nvm to change my node version to 14.0 and created react app. However, I want to use my app on node version 12.1.0. So I changed to node version v12.1.0 but I got:

"ERROR in Module.createRequire is not a function" error. Also " ERROR in Error: Child compilation failed: Module.createRequire is not a function "

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

0

You can try

curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -

sudo apt-get install -y nodejs

https://github.com/nodesource/distributions/blob/master/README.md#debinstall

over 4 years ago · Santiago Trujillo Relatório

0

Try completely updating the newest, stable version of both nodejs and npm:

sudo apt -y update && sudo apt -y upgrade

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo apt -y update && sudo apt -y upgrade
sudo apt -y autoremove

Then, change directories into your app directory:

cd myapp/ #Change this to match your app directory

Remove node_modules folder

sudo rm -rf node_modules/

Then reinstall the packages:

npm i

See if your app builds successfully:

npm run build
over 4 years ago · Santiago Trujillo Relatório

0

As we can read in official docs:

Create React App

Create React App is a comfortable environment for learning React, and is the best way to start building a new single-page application in React.

It sets up your development environment so that you can use the latest JavaScript features, provides a nice developer experience, and optimizes your app for production. You’ll need to have Node >= 14.0.0 and npm >= 5.6 on your machine.

So these are requirements that you must meet and it seems that it cannot be avoided that way .

over 4 years ago · Santiago Trujillo Relatório

0

Use 14+ of node.js version just use nvm -version_name

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