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

971
Vistas
Angular - Error with cheerio package? "You may need an additional loader to handle the result of these loaders"

I am suddenly facing this issue that seemingly came out of nowhere. The project I am working on in my company is rather large and we are using a micro frontend architecture. I was working in one branch yesterday and after building and pushing my code, I checked out to another branch to check something and then went back to the original branch I was in. After trying to serve the application again, I was faced with this error. It seems everyone else on the team is getting this error, too. Even those who haven't pulled the code I pushed.

Here is the error:

Error: ./node_modules/cheerio/node_modules/htmlparser2/lib/esm/index.js 59:9 Module parse failed: Unexpected token (59:9) File was processed with these loaders:

  • ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
  • ./node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js You may need an additional loader to handle the result of these loaders. | return getFeed(parseDOM(feed, options)); | }

export * as DomUtils from "domutils"; | // Old name for DomHandler | export { DomHandler as DefaultHandler };

Error: ./node_modules/cheerio/node_modules/parse5/dist/index.js 6:9 Module parse failed: Unexpected token (6:9) File was processed with these loaders:

  • ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
  • ./node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js You may need an additional loader to handle the result of these loaders. | export { serialize, serializeOuter } from './serializer/index.js'; | /** @internal */

export * as foreignContent from './common/foreign-content.js'; | /** @internal */ | export * as html from './common/html.js';

I've tried:

  • updating cheerio
  • deleting node_modules and package-lock, then running npm i
  • deleting cheerio
  • reverting back to before I pushed my code

Really not sure what else to do. This is my first stack overflow question so sorry if I'm missing any necessary info.

EDIT: I found two links on github

https://github.com/umijs/umi/issues/8109

https://github.com/cheeriojs/cheerio/issues/2545

and after following their instructions, I added cheerio to dev dependencies in package.json and then installed the 'stream' package. The error is resolved for the time being.

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