Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

364
Vistas
ANGULAR: FIX BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default

I want to use an api and here is my code:

translate(sentence:string){

const translate = require('translate-api');
let transText = sentence;

translate.getText(transText,{to: 'zh-CN'}).then(function(text: any){
console.log(text)
});}

The problem is that when I run the application with ng serve --open, I get this error message:

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false }

I understood that I had to add 'resolve.fallback: { "http": require.resolve("stream-http") }' somewhere, but I don't see where.

I can't find a solution specifically for angular and I can't adapt them.

I'm a beginner please be lenient. I thank you for your help.

Edit: to work around the problem I'm having with Angular-CLI version 13, I went back to the previous version. It works for me. But I still have no solution if I want to use version 13.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda