Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

355
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!