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

980
Visualizações
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 à 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