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

323
Visualizações
Cannot read property 'Tag' of undefined. from domhandler in react.js app

I have a react.js project, which indirectly uses domhandler v4.2.0 via cheerio.

Its worked fine for months and then suddenly, my project has started throwing this error when I try to build it.

Tag exists within domelementtype package...and I haven't touched these at all, because they are child dependencies of the main packages I imported originally.

C:\product-app\node_modules\domhandler\lib\node.js:32
    [domelementtype_1.ElementType.Tag, 1],
                                  ^

TypeError: Cannot read property 'Tag' of undefined
    at Object.<anonymous> (C:\product-app\node_modules\domhandler\lib\node.js:32:35)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\product-app\node_modules\domhandler\lib\index.js:15:14)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)

Any ideas what might be causing it?

I'm running node.js 12.16.1 with typescript 3.9.10. The project was originally built on create-react-app and I haven't changed anything, so something in my local environment must have changed to cause this.

I have tried:

  • clearing the node_modules (rimraf)
  • clearing npm cache (inc --force)
  • wiping out my local git repo and pulling a fresh
  • changing node versions
  • installing typescript globally
  • rebooting
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I had this problem, I deleted package-lock.json (and yarn lock if you have it) and node modules and then ran "npm install" in my terminal.

over 4 years ago · Santiago Trujillo Relatório

0

Try to use 1.0.0-rc.3. There was some breaking changes between that version and the latest.

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