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

321
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
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